Task: Program Execution
Input (English): 2, 2, ['3111', 'M']
Output (English): M