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

There are 30 non-terminal symbols, ranging from A1 to A30.

Production rules:
rule_1: A1 -> A28 A23 A17 A12 A2
rule_2: A2 -> 1
rule_3: A2 -> A8 A7 A5 A3
rule_4: A3 -> 3
rule_5: A3 -> A4 2
rule_6: A4 -> 4
rule_7: A5 -> 1
rule_8: A5 -> A6
rule_9: A6 -> 5
rule_10: A7 -> 1
rule_11: A7 -> A10 12
rule_12: A8 -> 1
rule_13: A8 -> A9 8 9
rule_14: A9 -> 1
rule_15: A9 -> 1
rule_16: A10 -> 1
rule_17: A10 -> A11 15
rule_18: A11 -> 1
rule_19: A11 -> A8 4 7
rule_20: A12 -> 1
rule_21: A12 -> A7 A9 A15 A13
rule_22: A13 -> A14 16
rule_23: A13 -> 17 16
rule_24: A14 -> 5
rule_25: A15 -> 1
rule_26: A15 -> A16 9
rule_27: A16 -> 8
rule_28: A17 -> 1
rule_29: A17 -> A9 A22 A20 A18
rule_30: A18 -> 19
rule_31: A18 -> A19
rule_32: A19 -> 8
rule_33: A20 -> 1
rule_34: A20 -> A21
rule_35: A21 -> 20
rule_36: A21 -> 21
rule_37: A22 -> 1
rule_38: A23 -> 1
rule_39: A23 -> A22 A27 A26 A24
rule_40: A24 -> 24 23
rule_41: A24 -> A25 23
rule_42: A25 -> 20
rule_43: A25 -> 21
rule_44: A26 -> 1
rule_45: A27 -> 1
rule_46: A27 -> A7 5 6
rule_47: A27 -> A22
rule_48: A28 -> 1
rule_49: A28 -> A27 A30 A29
rule_50: A29 -> 26 25
rule_51: A30 -> 1
rule_52: A30 -> A22 21 22

Target sequence:
1 10 11 8 9 4 7 14 15 12 13 5 6 1 21 22 1 26 25 1 1 1 24 23 1 1 20 22 19 18 1 1 1 17 16 1 1 1 3 2
"""