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 12 terminals, ranging from 1 to 12.
Each terminal symbol occurs in the target sequence at least once.

There are 59 non-terminal symbols, ranging from A1 to A59.

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

Target sequence:
12 3 1 2 5 4 10 7 11 8 6 9
"""