Task: Program Execution
Input (English): 9263, c, B, 481, R, 6599, 1861, 5431, G, c, 8981, p, 3911, X, 5083, 2437, B, M
Output (English): 9263, 3, 2, 481, 18, 6599, 1861, 5431, 7, 3, 8981, 16, 3911, 24, 5083, 2437, 2, 13