Task: Program Execution
Input (English): 3671, Q, 1017, T, 3813, 3181, M, 1213, I, 649, 1983, Q, P, l, 4463, 9319, 3067, 3553, 3135, 1657, x, z, E, 7145
Output (English): 3671, 17, 1017, 20, 3813, 3181, 13, 1213, 9, 649, 1983, 17, 16, 12, 4463, 9319, 3067, 3553, 3135, 1657, 24, 26, 5, 7145