Task: Program Execution
Input (English): 1, 5, ['d', 'N', '4021', 'M', '2037']
Output (English): 6058