Task: Program Execution
Input (English): 3, 3, ['1635', '4583', '2497']
Output (English): 2497