- Time limit: 1.00 s
- Memory limit: 512 MB
You have a cube that consists of cells. Your task is to color the cells with three colors, red, green, and blue, such that adjacent cells (i.e., cells that share a face) have different colors.
You need to produce a balanced coloring: ideally each color should appear the same number of times, but if this is not possible, you want to get as close to a perfect balance as possible. So if the numbers of red, green, and blue cells are , , and , you want to minimize .
Input
Input is a single line with one number, .
Output
Print out a valid coloring of the cube. You will print out first lines, each with space-separated characters; these represent the coloring of the topmost slice of the cube. Then you print out an empty line, and another lines that describe the coloring of the second slice of the cube, etc., until you have printed out all slices. You will use characters R, G, and B to represent the coloring.
Constraints
Example
Input:
2
Output:
R G B R B R G B