Task: Program Execution
Input (English): 7357, D, S, 3443, X, B, N, 3563, W, 5295, 8515, 2711, 9917, x, B, q, v, 59, B, r, 7221, 291
Output (English): 7357, 4, 19, 3443, 24, 2, 14, 3563, 23, 5295, 8515, 2711, 9917, 24, 2, 17, 22, 59, 2, 18, 7221, 291