Task: Program Execution
Input (English): A, 3743, 3729, 7339, 1567, 3657, 9143, q
Output (English): A, q, 3743, 3729, 7339, 1567, 3657, 9143