Task: Program Execution
Input (English): 2, 2, ['1797', '1431', 'Q', 'n', '2097', '4773']
Output (English): 1431