Task: Program Execution
Input (English): 2, 4, ['U', '3289', 'M', '8817', 'U']
Output (English): 12106