Task: Program Execution
Input (English): 6523, R, 5585, 557, 1187, 7861, B, B, V, 9419, 4873, M, g, 8035, W, 8001, 7127, O, 3993, 4743, d, 9987, e, 9387
Output (English): 6523, 18, 5585, 557, 1187, 7861, 2, 2, 22, 9419, 4873, 13, 7, 8035, 23, 8001, 7127, 15, 3993, 4743, 4, 9987, 5, 9387