Task: Program Execution
Input (English): 8395, 3361, Q, 9093, Q, 5001
Output (English): 8395, 3361, 9093, 5001