Task: Program Execution
Input (English): 5, 7, ['7149', 'n', '4209', '4339', 'r', '2871', 'B', 'F']
Output (English): 2871