Task: Program Execution
Input (English): 1, 3, ['M', 'S', 'P', '6427', '1121', '9055']
Output (English): PSM