Task: Program Execution
Input (English): 2, ['3089', '8543', '1251', '4235', '6937', '2597', '5757', 'S', '7841', '25', '2219', 'S', '943', 'M', '4651', '4285']
Output (English): 3089, 8543