Task: Program Execution
Input (English): 4, 4, ['L', 'F', '5761', '2217', 'W', '9965', '5193']
Output (English): 7122