Task: Program Execution
Input (English): 4, 4, ['U', '5381', '9095', '9747', '7213', '3615', '1779', '1231', '4317', '2613', '7557', '9931', 'Q']
Output (English): 9747