Task: Program Execution
Input (English): 2, 7, ['5469', 'm', 'F', '1917', 'B', '8587', 'R']
Output (English): 10504