Task: Program Execution
Input (English): 2735, 8251, S, 2871, b, T, i, G, C, q, 873, 9859, d, X, T, 3329
Output (English): 2735, 8251, 2871, 873, 9859, 3329