Task: Program Execution
Input (English): 1767, X, U, P, 1995, 2503, q, 4271, 8257, Q, 471, g, 9917, r, O
Output (English): X, U, P, q, Q, g, r, O