Task: Program Execution
Input (English): 3, 4, ['5131', '2969', 'F', 'M', '4525', '8215', 'Z']
Output (English): MF