Task: Program Execution
Input (English): n, T, 8061, 5051, 7127, 2491, 1003, K, D
Output (English): 8061, 5051, 7127, 2491, 1003