Updated production rules:
rule_2: A2 -> A3 1
rule_12: A8 -> A3 7
rule_14: A10 -> 8 9