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

There are 26 non-terminal symbols, ranging from A1 to A26.

Production rules:
rule_1: A1 -> A3 A25 21 A26 A3 A25 18 A24 A3 16 A2 A18
rule_2: A2 -> A8
rule_3: A2 -> A13 15
rule_4: A3 -> 1
rule_5: A3 -> 5 A4 4
rule_6: A3 -> 8 A5
rule_7: A3 -> 11 A6
rule_8: A3 -> 14 A7 13
rule_9: A4 -> 1
rule_10: A4 -> 2
rule_11: A4 -> 2 8 A5
rule_12: A5 -> 1
rule_13: A5 -> 3 A4 4
rule_14: A5 -> 9 11 A6
rule_15: A6 -> 1
rule_16: A6 -> 6
rule_17: A6 -> 6 8 A5 7
rule_18: A7 -> 1
rule_19: A7 -> 12
rule_20: A7 -> 12 A5 7
rule_21: A8 -> 1
rule_22: A8 -> 5 A12
rule_23: A8 -> 8 A9
rule_24: A8 -> 11 A11
rule_25: A8 -> 14 A10 13
rule_26: A9 -> 1
rule_27: A9 -> 3 5 A12
rule_28: A9 -> 9 11 A11 10
rule_29: A10 -> 1
rule_30: A10 -> 12 8 A9
rule_31: A11 -> 1
rule_32: A11 -> 6 8 A9 7
rule_33: A12 -> 1
rule_34: A12 -> 2 8 A9 7
rule_35: A13 -> 1
rule_36: A13 -> 5 A17 4
rule_37: A13 -> 8 A14
rule_38: A13 -> 11 A16 10
rule_39: A13 -> 14 A15 13
rule_40: A14 -> 1
rule_41: A14 -> 3 A17 4
rule_42: A14 -> 9
rule_43: A14 -> 9 A16 10
rule_44: A15 -> 1
rule_45: A15 -> 12 8 A14 7
rule_46: A16 -> 1
rule_47: A16 -> 6 8 A14 7
rule_48: A17 -> 1
rule_49: A17 -> 2 8 A14 7
rule_50: A18 -> A19 17
rule_51: A19 -> 1
rule_52: A19 -> 5 A23 4
rule_53: A19 -> 8 A20
rule_54: A19 -> 11 A22 10
rule_55: A19 -> 14 A21 13
rule_56: A20 -> 1
rule_57: A20 -> 3
rule_58: A20 -> 3 A23 4
rule_59: A20 -> 9 11 A22 10
rule_60: A21 -> 1
rule_61: A21 -> 12 8 A20 7
rule_62: A22 -> 1
rule_63: A22 -> 6 A20 7
rule_64: A23 -> 1
rule_65: A23 -> 2 8 A20 7
rule_66: A24 -> A3
rule_67: A24 -> A13
rule_68: A24 -> A19 19
rule_69: A25 -> 1
rule_70: A25 -> 20
rule_71: A26 -> A19

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