Task: Program Execution
Input (English): g, 5849, 1945, b, N, 6417, R, 7917, g, 4399, 3623, x, 3781, 4597, p, x, P, 5089
Output (English): 5849, 1945, 6417, 7917, 4399, 3623, 3781, 4597, 5089