Task: Program Execution
Input (English): 1741, Q, 2993, 1887, G, G, 4995, 7575, 2675, a, 941, 7169, 6365, 8703, N, 3501, 9697, 541, 353, 5273, 5603, Q
Output (English): 1741, 17, 2993, 1887, 7, 7, 4995, 7575, 2675, 1, 941, 7169, 6365, 8703, 14, 3501, 9697, 541, 353, 5273, 5603, 17