#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int num[1000];
const string ans[] = {"black","blue","lime","aqua","red",
		      "fuchsia","yellow","white"};
int ff = 15*16 + 15;
int RGB[][3] = {{0,0,0},
		{0,0,ff},
		{0,ff,0},
		{0,ff,ff},
		{ff,0,0},
		{ff,0,ff},
		{ff,ff,0},
		{ff,ff,ff}};

int _16to10(string a){
  return num[a[0]] * 16 + num[a[1]];
}
int main(){
  num['1'] = 1,  num['2'] = 2,  num['3'] = 3,  num['4'] = 4,num['5'] = 5,num['6'] = 6,num['7'] = 7,num['8'] = 8,num['9'] = 9,num['a'] = 10,num['b'] = 11,  num['c'] = 12,  num['d'] = 13,  num['e'] = 14,num['f'] = 15;
  string color;
  while(cin >> color,color[0] !='0') {
    string r,g,b;
    r = color.substr(1,2);
    g = color.substr(3,2);
    b = color.substr(5,2);
    int rnum,gnum,bnum;
    rnum = _16to10(r);
    gnum = _16to10(g);
    bnum = _16to10(b);
    double mn = 1000000000;
    string anscolor;
    for(int i = 7 ; i >= 0 ; i-- ){
      double dk = pow(rnum-RGB[i][0],2)+pow(gnum-RGB[i][1],2)+pow(bnum-RGB[i][2],2);
      if(mn >= dk){
	mn = dk;
	anscolor = ans[i];
      }
    } 
    cout << anscolor << endl;
  }
  return 0;
}