Task: Program Execution
Input (English): 3071, 9723, M, 3559, 1691, 9553, q
Output (English): M, q, 3071, 9723, 3559, 1691, 9553