Updated production rules:
rule_6: A4 -> A5 3
rule_12: A6 -> A5 5 6 7