Task: Program Execution
Input (English): 2, 2, ['E', '8731', 'D', 'Q', '5805', '5789', '7735', '6201', 'g', 'f', '7457']
Output (English): 8731, Q, 5789, 6201, f