#include<iostream>
#include<string>
#include<cmath>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define INF 1e6
using namespace std;

int d(string s,int color[3]){
  int red=(s[1]-'0')*16+(s[2]-'0');
  int green=(s[3]-'0')*16+(s[4]-'0');
  int blue=(s[5]-'0')*16+(s[6]-'0');
  return sqrt(pow((red-color[0]),2)+pow((green-color[1]),2)+pow((blue-color[2]),2));
}

int cl[8][3]={{0,0,0},{0,0,255},{0,255,0},{0,255,255},{255,0,0},{255,0,255},{255,255,0},{255,255,255}};

int main(){
  string s;
  while(cin>>s,s!="0"){
    int num=INF;
    string ans="";
    rep(i,8){
      if(num>d(s,cl[i])){
	if(i==0)ans="black";
	else if(i==1)ans="blue";
	else if(i==2)ans="lime";
	else if(i==3)ans="aqua";
	else if(i==4)ans="red";
	else if(i==5)ans="fuchsia";
	else if(i==6)ans="yellow";
	else if(i==7)ans="white";
	num=d(s,cl[i]);
      }
    }
    cout<<ans<<endl;
  }
  return 0;
}