Task: Program Execution
Input (English): 6659, c, C, m, 8641, 1067, 9861, V, J, R, 5243, W, B, P
Output (English): 31471