#include<iostream>
using namespace std;

int main()
{
  string s;
  for(;cin>>s,s!="0";)
    {
      int r=0,g=0,b=0;
      for(int i=1;i<3;i++)
	{
	  r*=16;
	  if(s[i]>='0'&&s[i]<='9')
	      r+=s[i]-'0';
	  else
	    r+=s[i]-'a'+10;
	}
      for(int i=3;i<5;i++)
	{
	  g*=16;
	  if(s[i]>='0'&&s[i]<='9')
	      g+=s[i]-'0';
	  else
	   g+=s[i]-'a'+10;
	}
      for(int i=5;i<7;i++)
	{
	  b*=16;
	  if(s[i]>='0'&&s[i]<='9')
	      b+=s[i]-'0';
	  else
	    b+=s[i]-'a'+10;
	}
      string color[]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};
      int rk[]={0,0,0,0,0xff,0xff,0xff,0xff};
      int gk[]={0,0,0xff,0xff,0,0,0xff,0xff};
      int bk[]={0,0xff,0,0xff,0,0xff,0,0xff};
      
      int ans=0;
      for(int i=1;i<8;i++)
	{
	  int a1=(r-rk[i])*(r-rk[i])+(g-gk[i])*(g-gk[i])+(b-bk[i])*(b-bk[i]);
	  int a2=(r-rk[ans])*(r-rk[ans])+(g-gk[ans])*(g-gk[ans])+(b-bk[ans])*(b-bk[ans]);
	  // /cout<<a1<<endl;
	  //cout<<a2<<endl;
	  if(a1<a2)
	    ans=i;
	}
      cout<<color[ans]<<endl;
    }
}