#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int C = 8;

string cs[C] = {"black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white"};
int R[C] = {0, 0, 0, 0, 255, 255, 255, 255};
int G[C] = {0, 0, 255, 255, 0, 0, 255, 255};
int B[C] = {0, 255, 0, 255, 0, 255, 0, 255};

int solve(int r, int g, int b){
  int d = 1e9, res = 0;
  REP(i, C){
    int _d = (r - R[i]) * (r - R[i]) + (g - G[i]) * (g - G[i]) + (b - B[i]) * (b - B[i]);
    if(_d < d){ d = _d; res = i; }
  }
  return res;
}

int main() {
  string s;
  char **buf;
  while(cin >>s && s != "0"){
    string _s = s, __s = s;
    int r = (int)strtol(s.substr(1, 2).c_str(), buf, 16);
    int g = (int)strtol(_s.substr(3, 2).c_str(), buf, 16);
    int b = (int)strtol(__s.substr(5, 2).c_str(), buf, 16);
    cout <<cs[solve(r, g, b)] <<endl;
  }
  return 0;
}