I have a context free grammar (CFG). The initial symbol is `A1`. The terminal symbols are just integers and the non-terminal symbols start with `A`. I also have a target sequence of terminal symbols which needs to be produced by the grammar. However, the CFG production rules have had some terminal symbols removed which may now render it impossible to produce the target sequence. Please attempt to repair the CFG so that the sequence can be produced. The only operations which can be made to repair the CFG are the insertion of terminal symbols anywhere in existing production rules. Deleting or reordering symbols in existing production rules and creating new production rules is prohibited. Please try minimize the total number of terminal symbols inserted into the production rules so that the CFG can produce the target sequence. Reason about the problem however you wish and write out whatever working out you want. When you are finished please write a new line with `Updated production rules:`, and then write a new line for each of the updated production rules (including `rule_<n>:`), no need to rewrite the production rules which haven't changed. Do not write anything after the updated production rules.


"""
There are 36 terminals, ranging from 1 to 36.
Each terminal symbol occurs in the target sequence at least once.

There are 51 non-terminal symbols, ranging from A1 to A51.

Production rules:
rule_1: A1 -> A2
rule_2: A2 -> 36 A46 A49
rule_3: A3 -> 7 A4
rule_4: A3 -> 8 A5
rule_5: A4 -> 1
rule_6: A4 -> 2
rule_7: A4 -> 3
rule_8: A4 -> 6
rule_9: A5 -> 1
rule_10: A5 -> 2
rule_11: A5 -> 3
rule_12: A6 -> A7 A3
rule_13: A7 -> 10
rule_14: A8 -> A9 A10
rule_15: A9 -> 11
rule_16: A10 -> 7 A11
rule_17: A10 -> 8 A12
rule_18: A11 -> 1
rule_19: A11 -> 2
rule_20: A11 -> 3
rule_21: A12 -> 1
rule_22: A12 -> 2
rule_23: A12 -> 3
rule_24: A12 -> 12
rule_25: A13 -> A14 A15
rule_26: A14 -> 13
rule_27: A15 -> 4 A16
rule_28: A15 -> 5 A17
rule_29: A16 -> 1
rule_30: A16 -> 2
rule_31: A16 -> 3
rule_32: A17 -> 1
rule_33: A17 -> 2
rule_34: A17 -> 3
rule_35: A18 -> A19 A20
rule_36: A19 -> 14
rule_37: A20 -> 4 A21
rule_38: A20 -> 5 A22
rule_39: A21 -> 1
rule_40: A21 -> 2
rule_41: A21 -> 3
rule_42: A21 -> 15
rule_43: A22 -> 1
rule_44: A22 -> 2
rule_45: A22 -> 3
rule_46: A23 -> A24 A25
rule_47: A24 -> 18
rule_48: A25 -> 16 A27
rule_49: A25 -> 17 A26
rule_50: A26 -> 1
rule_51: A26 -> 2
rule_52: A26 -> 3
rule_53: A27 -> 1
rule_54: A27 -> 2
rule_55: A27 -> 3
rule_56: A28 -> A29 A30
rule_57: A29 -> 19
rule_58: A30 -> 16 A31
rule_59: A30 -> 17 A32
rule_60: A31 -> 1
rule_61: A31 -> 2
rule_62: A31 -> 3
rule_63: A32 -> 1
rule_64: A32 -> 2
rule_65: A32 -> 3
rule_66: A33 -> 20
rule_67: A34 -> 21
rule_68: A35 -> 22 A36
rule_69: A36 -> 9
rule_70: A36 -> 23
rule_71: A37 -> 25 A33 24
rule_72: A38 -> 26
rule_73: A39 -> 27 A40
rule_74: A40 -> 9
rule_75: A41 -> A42 A39 A23 A38
rule_76: A42 -> 28 A28
rule_77: A43 -> 29
rule_78: A44 -> 30 A43
rule_79: A45 -> 32 A41
rule_80: A46 -> A47
rule_81: A47 -> A48 A37 A35 A6 A34
rule_82: A48 -> 34 A8
rule_83: A49 -> A50
rule_84: A50 -> A51 A45 A18 A44
rule_85: A51 -> 35 A13

Target sequence:
36 34 11 8 12 25 20 24 22 23 10 7 6 21 35 13 5 1 32 28 19 17 2 27 9 18 16 3 26 33 14 4 15 30 29 31
"""