Task: Program Execution
Input (English): V, 2801, 89, 8199, G, m, 1771, 4163, 5007, n
Output (English): 1, 5, 6, 10