Updated production rules:
rule_2: A2 -> 14 A3 1
rule_9: A4 -> 3 5 10
rule_17: A7 -> 6 A8 5