Task: Program Execution
Input (English): 8291, 1317, 1143, v, k, N, Q
Output (English): 1, 2, 3