Task: Program Execution
Input (English): 23, 379, q, 51, 297, 15
Output (English): 1, 2, 3, 5, 7, 9