Task: Program Execution
Input (English): 5101, D, C, W, 7047, N, 2277, 6831, Q
Output (English): 21256