Updated production rules:
rule_4: A3 -> A9 2 8 A8 6
rule_38: A16 -> A4 3 A17 13