Task: Program Execution
Input (English): 3, 15, ['l', '7213', '6849', '4327', 'V', 'S', '3773', '2583', 'f', '5031', 'J', '5263', 'w', '9777', '2753']
Output (English): 40356