Task: Program Execution
Input (English): 3, 6, ['C', 'g', 'w', '1191', 'M', '8751']
Output (English): 1578M1911w