Task: Program Execution
Input (English): N, O, 671, p, 853, w, 1987, 5871, q, 4649, j, p
Output (English): 14, 15, 671, 16, 853, 23, 1987, 5871, 17, 4649, 10, 16