#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
int main(void){
  int col;
  char c;
  while(cin>>c>>hex>>col){
    if(c=='0') break;
    int data[3];
    REP(i,3){
      data[i] = col%256;
      col/=256;
    }
    bool judge[3];
    REP(i,3){
      if(255-data[2-i]<data[2-i]){
        judge[i] = false;
      }else{
        judge[i] = true;
      }
    }
    if(judge[0]){
      if(judge[1]){
        if(judge[2]){
          cout<<"black"<<endl;
        }else{
          cout<<"blue"<<endl;
        }
      }else{
        if(judge[2]){
          cout<<"lime"<<endl;
        }else{
          cout<<"aqua"<<endl;
        }
      }
    }else{
      if(judge[1]){
        if(judge[2]){
          cout<<"red"<<endl;
        }else{
          cout<<"fuchsia"<<endl;
        }
      }else{
        if(judge[2]){
          cout<<"yellow"<<endl;
        }else{
          cout<<"white"<<endl;
        }
      }
    }
  }
  return 0;
}