Task: Program Execution
Input (English): 487, 371, 43
Output (English): 1, 3, 4, 7, 8