Task: Program Execution
Input (English): 31, 141, 463, z, 65, x, 437, q
Output (English): 1, 3, 4, 5, 6, 7