#include <stdio.h>
void Final_Sequence(int k) {
char sequence[3] = {'B', 'G', 'R'};
for (int i = 0; i < k; i++) {
// Perform the operations separately
char initial = sequence[0];
sequence[0] = sequence[1];
sequence[1] = sequence[2];
sequence[2] = initial;
}
printf("%c%c%c\n", sequence[0], sequence[1], sequence[2]);
}
int main() {
int T;
// Taking user input for the number of test cases
scanf("%d", &T);
for (int i = 1; i <= T; i++) {
int k;
// Taking user input for the number of operations for each test case
printf("\n%d: ", i);
scanf("%d", &k);
Final_Sequence(k);
}
return 0;
}