Task: Program Execution
Input (English): 4029, t, 9789, 5207, M, l, 777, v, 7197, 5693, 6787, r, W
Output (English): 39479