Task: Program Execution
Input (English): 407, l, 287, 325, r
Output (English): 0, 2, 3, 4, 5, 7, 8