Task: Program Execution
Input (English): r, 387, 5, 351, 211, 89
Output (English): 1, 2, 3, 5, 7, 8, 9