Task: Program Execution
Input (English): x, 273, 365, 497, 21, p
Output (English): 1, 2, 3, 4, 5, 6, 7, 9