Task: Program Execution
Input (English): J, T, 3771, a, 5373, Q, 1201, o, M, 4143, 4139, 2989, X
Output (English): J, T, a, Q, o, M, X