Task: Program Execution
Input (English): 3157, N, x, 5055, R, v, 5697, 2207, U, 6343, L
Output (English): 3157, 5055, 5697, 2207, 6343