Task: Program Execution
Input (English): 471, 301, 87, r
Output (English): 0, 1, 3, 4, 7, 8