Red Green Blue

Red Green Blue

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

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

Brain booster - 1

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
10
Start at
2023-12-31 13:15
End at
2023-12-31 17:15
Duration
4.0 hour(s)
Host
Partic.
36