#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<cassert>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define rep(i,s,n) for(int i=(s); i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))
#define print(x) printf("%d\n",x)

using namespace std;

typedef unsigned int uint;
typedef long long ll;

const int _dx[] = {0,1,0,-1};
const int _dy[] = {-1,0,1,0};

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

int main(){
  int table[][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}
  };

  const char *name[] = {
    "black",
    "blue",
    "lime",
    "aqua",
    "red",
    "fuchsia",
    "yellow",
    "white",
  };

  const int n = sizeof(table) / sizeof(table[0]);

  char buff[256];
  while(fgets(buff,sizeof(buff),stdin), buff[0] != '0'){
    char col[3] = { 0 };
    int rgb[3];
    int diff = INT_MAX;
    int ans;
    REP(i,3){
      col[0] = buff[1 + i*2];
      col[1] = buff[1 + i*2 + 1];

      sscanf(col, "%x", rgb + i);
    }

#define DBL(x) ((x)*(x))
    REP(i,n){
      int tmp = 0;
      REP(j,3)
        tmp += DBL(rgb[j] - table[i][j]);
      if(tmp < diff){
        diff = tmp;
        ans = i;
      }
    }
    puts(name[ans]);
  }

  return 0;
}