Updated production rules:
rule_18: A7 -> 8 7
rule_20: A8 -> 4 10 9