Task: Program Execution
Input (English): 3363, 9787, 5249, G, T, k, q, 2547, G, X, X, 7737, K, 6401, j, 9735, v, 4553, O, 7335, D, 5517, T
Output (English): G, T, k, q, G, X, X, K, j, v, O, D, T