Task: Program Execution
Input (English): 9, 353, 291, 65, 231, b, d
Output (English): 1, 2, 3, 5, 6, 9