The only terminals missing from the grammar are 21 and 19, and they must appear exactly at positions 16 and 24 in the target.  All other subsequences line up perfectly with the existing productions.  We can therefore insert “21” at the start of rule_3 so that A3 yields 21 5 4 6, and insert “19” at the end of rule_31 so that A26 yields 18 17 11 12 19.

Updated production rules:
rule_3: A3 -> 21 A4 A5
rule_31: A26 -> 18 A24 19