Task: Program Execution
Input (English): n, 189, 469, 17
Output (English): 1, 4, 6, 7, 8, 9