Task: Program Execution
Input (English): R, 6051, B, 3469, W, 4163, 4861, N, 5047, 2617, r, W, 8041, B
Output (English): 6051, 3469, 4163, 4861, 5047, 2617, 8041