Task: Program Execution
Input (English): 3477, R, h, S, 4727, l, b, a, R, 1251, G, A, 5135, 9087, S, q, 6329, 5105, 1287
Output (English): 3477, 18, 8, 19, 4727, 12, 2, 1, 18, 1251, 7, 1, 5135, 9087, 19, 17, 6329, 5105, 1287