I found that the only terminal from 1…31 that never appears anywhere in the grammar is 13, yet it’s required in the target (between the 12 and the 18).  By inserting a single 13 into the existing rule that introduces the 18, the grammar can now emit the “…12 13 18…” subsequence without deleting or re‐ordering anything else.  All other terminals already occur somewhere in the CFG, so no further insertions are needed.

Updated production rules:
rule_86: A49 -> A50 13 18