Task: Program Execution
Input (English): N, 8951, D, 1607, 1679, 6281, a, g, V, Y, 2031, g, I, 2717, b, 5889, t
Output (English): 8951, 1607, 1679, 6281, 2031, 2717, 5889