Task: Program Execution
Input (English): 3, 3, ['U', 'R', '9657', 'h', 'N', 'y', '7823', '7821']
Output (English): 9657