Task: Program Execution
Input (English): q, 221, 19, n, 417
Output (English): 1, 2, 4, 7, 9