Task: Program Execution
Input (English): 4, 4, ['413', '7213', 'Q', 'M', '3621']
Output (English): M