Updated production rules:
rule_16: A7 -> 5 2
rule_27: A12 -> A3 10
rule_39: A17 -> 13 11