Task: Program Execution
Input (English): n, a, 479, b, f, w, 251, 391, 447
Output (English): 1, 2, 3, 4, 5, 7, 9