Task: Program Execution
Input (English): 6723, R, L, 9161, D, 8677, 9803, 2447
Output (English): 6723, 18, 12, 9161, 4, 8677, 9803, 2447