Task: Program Execution
Input (English): R, 6351, g, N, 4053, Q, B, g, 9805, 2329
Output (English): 6351, 4053, 9805, 2329