Updated production rules:
rule_4: A3 -> 3 2
rule_16: A9 -> A10 10 11
rule_18: A10 -> A7 6 7 4 5