Updated production rules:
rule_38: A16 -> A4 3 A17 13
rule_24: A10 -> A9 A11 8
rule_20: A8 -> 7 6