Task: Program Execution
Input (English): 3191, T, 1249, 999, R, A, M, 1437, 1139, 7007, 3627, O, 5509, 5239, R, n, I, m, X, H, 5475, 7081
Output (English): 3191, 20, 1249, 999, 18, 1, 13, 1437, 1139, 7007, 3627, 15, 5509, 5239, 18, 14, 9, 13, 24, 8, 5475, 7081