Task: Program Execution
Input (English): y, 471, 31, 251, 9
Output (English): 1, 2, 3, 4, 5, 7, 9