Task: Program Execution
Input (English): 5907, 5643, 5451, 1501, r
Output (English): 1, 2, 3, 4