Task: Program Execution
Input (English): 397, n, z
Output (English): 3, 7, 9