CSES - Aalto Competitive Programming 2024 - wk5 - Wed - Coloring cube
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You have a cube that consists of n \times n \times n 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 r, g, and b, you want to minimize \max \{r,g,b\} - \min \{r,g,b\}.

Input

Input is a single line with one number, n.

Output

Print out a valid coloring of the cube. You will print out first n lines, each with n space-separated characters; these represent the coloring of the topmost slice of the cube. Then you print out an empty line, and another n lines that describe the coloring of the second slice of the cube, etc., until you have printed out all n slices. You will use characters R, G, and B to represent the coloring.

Constraints

  • 1 \leq n \leq 100

Example

Input:

2

Output:

R G
B R

B R
G B