Task: Program Execution
Input (English): 2831, 5261, 6727, U, 1731, 5863, 2733, 4757, D, T, 397, J, 4289, 3005, D, s
Output (English): 2831, 5261, 6727, 1731, 5863, 2733, 4757, 397, 4289, 3005