Task: Program Execution
Input (English): 4221, M, 2943, 7627, v, 2215, K, 449, S, 5835, M, X, 2847
Output (English): 4221, 13, 2943, 7627, 22, 2215, 11, 449, 19, 5835, 13, 24, 2847