Task: Program Execution
Input (English): 2, 2, ['l', '4497', '5287', '4851', 'm', 'T', '5073', '3347', '8935', 'T']
Output (English): 4497