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

There are 34 non-terminal symbols, ranging from A1 to A34.

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

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