Task: Program Execution
Input (English): n, G, 4011, 5369, 8053, U, 2477, 2791, 3921, 1585, p, S, 4069, M, O, u, U, 6961, J, Q
Output (English): 4011, 5369, 8053, 2477, 2791, 3921, 1585, 4069, 6961