Task: Program Execution
Input (English): n, n, v, 8109, 7485, 1541, W, N, 9865
Output (English): 4, 5, 6, 9