Task: Program Execution
Input (English): 153, 159, 463, 451, 181, 343, p, q
Output (English): 1, 3, 4, 5, 6, 8, 9