Task: Program Execution
Input (English): 5639, O, Q, Z, D, 475, 8155, N, M, 3579, U, c, L, 4761, d, 6371, Q
Output (English): O, Q, Z, D, N, M, U, c, L, d, Q