Updated production rules:
rule_9: A5 -> 5 2
rule_21: A12 -> 5 2 12