Task: Program Execution
Input (English): 3, 5, ['w', 'H', 'P', 's', 'M', 'V']
Output (English): PsM