Task: Program Execution
Input (English): n, 7699, 7503, Q
Output (English): n, Q