Task: Program Execution
Input (English): I, M, E, w, d, 3623, a, Q, 3989, 8039, R, I, X, 6397, g, o, 2331
Output (English): 3623, 3989, 8039, 6397, 2331