#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int a[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}
};
string out[8]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};
int main(){
  string in;
  map<char,int>c;
  rep(i,10)c[i+'0']=i;
  loop(i,'a','f'+1)c[i]=i-'a'+10;
  while(cin>>in,in!="0"){
    int min=1e9;
    int mini=1e9;
    int b[3]={c[in[1]]*16+c[in[2]],c[in[3]]*16+c[in[4]],c[in[5]]*16+c[in[6]]};
    //cout<<b[0]<<" "<<b[1]<<" "<<b[2]<<endl;
    rep(i,8){
      double sum=0;
      rep(j,3)sum+=pow(b[j]-a[i][j],2);
      if(min>sum){min=sum;mini=i;}
    }
    cout<<out[mini]<<endl;
  }
}