Task: Program Execution
Input (English): 4989, 3367, A, 9243, 5267, M, 2931, 4507, 8865, c, 3015
Output (English): A, M, c, 4989, 3367, 9243, 5267, 2931, 4507, 8865, 3015