Task: Program Execution
Input (English): 3, 3, ['n', '7977', '7371', 'r', '9273', 'h']
Output (English): 7371