#define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
#include <iterator>
 
using namespace std;
 
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
 
#define FOR(i,n) for(int i = 0; i < (n); i++)
#define sz(c) ((int)c.size())

typedef unsigned long long ull;
const int INF = (int)1e8;

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

int main(){
	string s;
	while(cin>>s,s!="0"){
		int t = 0;
		for(int i = 1; i <= 6; i++){
			t *= 16;
			if('a' <= s[i] && s[i] <= 'f')
				t += s[i] - 'a' + 10;
			else
				t += s[i] - '0';
		}
		int id = -1;
		int ans = INF;
		FOR(i,8){
			int buf = t;
			int d = 0;
			FOR(j,3){
				int a = buf & 255;
				int b = (i&(1<<j)) ? 255 : 0;
				d += (a-b)*(a-b);
				buf /= 256;
			}
			if(ans > d){
				id = i;
				ans = d;
			}
		}
		cout << out[id] << endl;
	}
	return 0;
}