Task: Program Execution
Input (English): n, c, 3771, D, f, 8493, 5833, 6821, 4423, n, F, 7095, C, 3489, 4399, M, 3709, X
Output (English): 3771, 8493, 5833, 6821, 4423, 7095, 3489, 4399, 3709