Task: Program Execution
Input (English): 1457, S, Q, p, 8433, u, d, U, w, 3561, 5881, 3433, 8933
Output (English): 1457, 8433, 3561, 5881, 3433, 8933