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

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)

typedef pair<double, int> pdi;

int lis[8][3] = {
	{0, 0, 0},
	{0, 0, 0xff},
	{0, 0xff, 0},
	{0, 0xff, 0xff},
	{0xff, 0, 0},
	{0xff, 0, 0xff},
	{0xff, 0xff, 0},
	{0xff, 0xff, 0xff}
};

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

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

int main() {
	string str;
	while (cin >> str, str != "0") {
		int c[3];
		REP(i, 3) { c[i] = 16 * calc(str[1 + i * 2]) + calc(str[1 + i * 2 + 1]); }
		
		vector<pdi> ans;
		REP(i, 8) {
			double d = 0.0;
			REP(j, 3) d += pow(lis[i][j] - c[j], 2.0);
			d = sqrt(d);
			ans.push_back(pdi(d, i));
		}
		sort(ans.begin(), ans.end());
		cout << color[ans[0].second] << endl;
	}
	return 0;
}