Task: Program Execution
Input (English): G, X, m, 4501, 4189, 9077, 6973, g, 1149, p, T, Q, 6497, q, 6965, M
Output (English): G, X, m, g, p, T, Q, q, M, 4501, 4189, 9077, 6973, 1149, 6497, 6965