Task: Program Execution
Input (English): N, 2477, U, p, B, k, 9535, 9007, s, W, l, 1177, i, 1381, s, 5111, M, F, 1507, q, 2441, 2419, M
Output (English): 14, 2477, 21, 16, 2, 11, 9535, 9007, 19, 23, 12, 1177, 9, 1381, 19, 5111, 13, 6, 1507, 17, 2441, 2419, 13