Task: Program Execution
Input (English): 5, 7, ['S', 'E', 'o', 'D', 'X', '8011', 'M', 'E', '3185', '3061', '9837', '3717', '6975', 'B', 'M', '4031', 'l', 'R', '3815']
Output (English): M1108X