Consider the 3x3x3 cube shown above. There are nine squares on each of its six faces, and each face is colored using the following pattern:
- The four corner squares are red.
- The center square is green.
- The remaining four squares are blue.
There is a robot standing in the green square of the top face of the cube, facing one of the blue squares. It receives a sequence of commands. Each command is one of the following:
- 'L': Stay in the current square and turn left 90 degrees.
- 'R': Stay in the current square and turn right 90 degrees.
- 'W': Walk forward in the current direction to the next square.
Note that the robot can cross an edge of the cube into another face. When that happens, the cube will rotate automatically to keep the robot on the top face.
You are given a String movement containing the sequence of commands received by the robot. The robot will execute all of the commands in order. Return the color of the robot's final landing square - "RED", "GREEN" or "BLUE" (all quotes for clarity). |