#include<bits/stdc++.h>
using namespace std;

string colors[] = {"black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white"};

int dis(int id, vector<int> a){
  int res = 0;
  for(int i=0;i<3;i++){
    int comp = 0;
    if(id&1) comp = 255;
    res += (a[i]-comp)*(a[i]-comp);
    id/=2;
  }
  return res;
}

int toDec(char a){
  if(isdigit(a))return a-'0';
  return a-'a'+10;
}

int main(){
  string s;
  while(cin >> s, s != "0"){
    vector<int> a(3);
    for(int i=0;i<3;i++){
      a[i] = toDec(s[2*i+1])*16 + toDec(s[2*i+2]);
    }
    reverse(a.begin(), a.end());
    int ans = 0, dmin = dis(0,a);
    for(int i=1;i<8;i++){
      if(dis(i,a) < dmin){
        ans = i; dmin = dis(i,a);
      }
    }
    cout << colors[ans] << endl;
  }
}