Task: Program Execution
Input (English): 3, 3, ['z', '3865', '547', 'a', 'L', '365', 'l', 'M', '2133', 'c', 'I', '1949', 'h', '3107', '7911', '4603']
Output (English): 547