//41
#include<iostream>
#include<cstdlib>

#define S(X) ((X)*(X))

using namespace std;

int main(){
  for(char c[8];cin>>c,c[0]!='0';){
    int md=1<<30;
    int cn;
    unsigned cd=strtoul(c+1,0,16);
    for(int i=0;i<8;i++){
      unsigned d=0;
      for(int j=0;j<3;j++){
	static const unsigned cc[]={0x0,0xff,0xff00,0xffff,0xff0000,0xff00ff,0xffff00,0xffffff};
	d+=S((cd>>j*8&0xFF)-(cc[i]>>j*8&0xFF));
      }
      if(d<md){
	md=d;
	cn=i;
      }
    }
    const char *cstr[]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};
    cout<<cstr[cn]<<endl;
  }
  return 0;
}
      
	