#include<iostream>
#include<string>
#include<cmath>

using namespace std;

void DevideColor(string, int&, int&, int&);
int Atoi16(char);
double Calculate(int, int, int, int, int, int);

int main(){
  int i, Red, Green, Blue;
  double min, font[8];
  string Color, StrongColor;
  string color[8] = {"black", "blue", "lime", "aqua", "red", "fuchsia","yellow", "white"};

  while(1){
    cin >> Color;
    if(Color == "0") break;

    DevideColor(Color, Red, Green, Blue);

    font[0] = Calculate(Red, Green, Blue, 0, 0, 0);
    font[1] = Calculate(Red, Green, Blue, 0, 0, 255);
    font[2] = Calculate(Red, Green, Blue, 0, 255, 0);
    font[3] = Calculate(Red, Green, Blue, 0, 255, 255);
    font[4] = Calculate(Red, Green, Blue, 255, 0, 0);
    font[5] = Calculate(Red, Green, Blue, 255, 0, 255);
    font[6] = Calculate(Red, Green, Blue, 255, 255, 0);
    font[7] = Calculate(Red, Green, Blue, 255, 255, 255);

    min = font[0];
    StrongColor = color[0];

    for(i=1; i<8; ++i){
      if(font[i] < min){
        min = font[i];
        StrongColor = color[i];
      }
    }

    cout << StrongColor << endl;
  }

  return 0;

}

void DevideColor(string s, int& r, int& g, int& b){
  string R, G, B;
  copy(s.begin()+1, s.begin()+3, back_inserter(R));
  copy(s.begin()+3, s.begin()+5, back_inserter(G));
  copy(s.begin()+5, s.end(), back_inserter(B));
  r = Atoi16(R[0])*16 + Atoi16(R[1]);
  g = Atoi16(G[0])*16 + Atoi16(G[1]);
  b = Atoi16(B[0])*16 + Atoi16(B[1]);
}

int Atoi16(char c){
  int x;
  if(c >= '0' && c <= '9')
    x = c - 48;
  else
    x = c - 87;
  return x;
}

double Calculate(int r, int g, int b, int _r, int _g, int _b){
  int R, G, B;
  R = r - _r;
  G = g - _g;
  B = b - _b;
  return sqrt(R*R + G*G + B*B);
}