Task: Program Execution
Input (English): 3, 5, ['X', 'M', 'o', '5993', 'J', '8065', '1259', 'n', 'W', '5923', '6985']
Output (English): 5993