Updated production rules:
rule_8: A5 -> A6 3
rule_10: A6 -> A5 5
rule_13: A7 -> A6 7