Task: Program Execution
Input (English): 6057, N, P, 1501, 3101, S, 8203, q, 5485, 2881, 9329, g, 2323, 629, X, 6859, 9713, 5, N, 9061, 9831, 8999, 4863
Output (English): 6057, 1501, 3101, 8203, 5485, 2881, 9329, 2323, 629, 6859, 9713, 5, 9061, 9831, 8999, 4863