Task: Program Execution
Input (English): Q, 1373, 5895, d, W, 7837, e, g, R
Output (English): Q, d, W, e, g, R, 1373, 5895, 7837