Here is one minimal way to restore the missing terminals so that A1 can derive the target sequence.  We only need to insert eight terminals in total:

Updated production rules:
rule_18: A12 -> 12 11
rule_21: A14 -> A9 6 7 4 5 8 9 A8 A17 A15 13