Task: Program Execution
Input (English): A, 1557, S, 2777, 8387, 9173, 8543, M, 5663, 4153, 1115, X, 1175, 8329, 2333, 1225, 4485
Output (English): 1, 1557, 19, 2777, 8387, 9173, 8543, 13, 5663, 4153, 1115, 24, 1175, 8329, 2333, 1225, 4485