Task: Program Execution
Input (English): n, 9607, 2943, m, v, Z, a
Output (English): 1, 4, 5, 6, 7