Task: Program Execution
Input (English): X, T, 4971, 4177, c, M, a, c, A, N, S, N, 4977, 9747, M, u
Output (English): 24, 20, 4971, 4177, 3, 13, 1, 3, 1, 14, 19, 14, 4977, 9747, 13, 21