Task: Program Execution
Input (English): 2, 4, ['D', 'M', 'W', '3041', '4431', '1429', 'W', 'Y', 'R', 'j', '1829', 'b', 'd', 'p', 'j', 'N', '5371', 'L']
Output (English): 3041