Task: Program Execution
Input (English): 3, 3, ['c', '5901', '4107']
Output (English): 4107