Task: Program Execution
Input (English): 1239, T, M, 9301, x, 9727, 5109
Output (English): 1239, 20, 13, 9301, 24, 9727, 5109