Task: Program Execution
Input (English): 2477, 9415, 9387, 3969, 871, K, J, T, H, P, w, 1271, S, 1289, X, 8543, P, 1323, g, S, w, 97, E, 6859
Output (English): 2477, 9415, 9387, 3969, 871, 1271, 1289, 8543, 1323, 97, 6859