Task: Program Execution
Input (English): N, K, 6005, 2135, 3977, j, 8355, N, 7009, X, Q, L, 8217
Output (English): 6005, 2135, 3977, 8355, 7009, 8217