Task: Program Execution
Input (English): 4709, g, 8071, 229, 6335, G, N, M, 8877, G, C, M, m, 6165, W, 4261, 1665, R, 3811, 9357
Output (English): 4709, 7, 8071, 229, 6335, 7, 14, 13, 8877, 7, 3, 13, 13, 6165, 23, 4261, 1665, 18, 3811, 9357