Task: Program Execution
Input (English): 6, 6, ['4467', 'G', '7651', '1697', 'S', '2711', '7381', 'R']
Output (English): 2711