Task: Program Execution
Input (English): 2, 3, ['P', 'B', 'M']
Output (English): MB