Task: Program Execution
Input (English): W, 6287, D, 1165, N, k, g, Y, A, m, 2541, m, W, 9927, D, K, 5865, 3553, 5223
Output (English): 34561