Task: Program Execution
Input (English): n, Y, 9367, 9497, x, q, x
Output (English): 9367, 9497