#include <bits/stdc++.h>
using namespace std;
int a,t;

int main() {
	     std::cin >> t;
    while(t--){
        
   
        std::cin >> a;
        if(a<=3){
            std::cout << "BRONZE" << std::endl;
        }
        else if(a>3 and a<=6){
            std::cout << "SILVER" << std::endl;
        }
        else{
            std::cout << "GOLD" << std::endl;
        }
    }
	// your code goes here

}
