Task: Program Execution
Input (English): 2, 3, ['N', '3987', 'M', 'Z', '3553', '2893', 'K', 'L', '1331', '7439', 'f', 'w']
Output (English): M3987