Task: Program Execution
Input (English): 5201, 2321, A, 3961, 3871, B, R, 1667, Q, 7649
Output (English): A, B, R, Q