The .M and .A commands can operate only on the top statement in the stack. The .G command can be used to retrieve any statement in the stack and place it on top. The .G command requires a single parameter, the number of the statement to be moved. The specified statement is moved from its previous position, and all statements are renumbered accordingly.
See Also
Executing Previous Statements (.X)
Replacing Text in the Stack (.M)
Storing a Series of Statements (.C)