Task: Program Execution
Input (English): 1017, 7929, L, 8781, 4353, f, N, 2421, d, 4321, R, 2141, 2651
Output (English): 1017, 7929, 8781, 4353, 2421, 4321, 2141, 2651