Red Green Blue

Red Green Blue

Time Limit: 1.0 s

Memory Limit: 64.0 MB

Description

You have three pen in your hand in this sequence red,green,blue which can be represented by a string "RGB".
Now you are doing the following operations on three pen alternately

  • take the leftmost pen and put it into the middle of the other two pen
  • take the rightmost pen and put it into the middle of the other two pen

first three operations on the string will be "RGB"->"GRB"->"GBR"->"BGR" , so after 3 operations the resulting string will be "BGR"

can you find out the final string of the sequence of three pen after k operations?

Format

Input

first line consists an integer T: number of testcase
each of the testcase contains an integer K: number of operations
1<= T <=1000
1<= K <=\(10^7\)

Output

print T lines, each line should contain a string of length 3.

Sample 1

Input

3
1
2
3

Output

GRB
GBR
BGR

Sample

Input Output
3
1
2
3
GRB
GBR
BGR

Information

ID
1010
Difficulty
5
Category
(None)
Tags
(None)
# Submissions
97
Accepted
34
Accepted Ratio
35%
Uploaded By

Related

In following contests:

Brain booster - 1