#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

struct color {
	int r, g, b;
};
map<string, color>mp{
	{"black",{0,0,0}},
	{"blue",{0,0,0xff}},
	{"lime",{0,0xff,0} },
	{"aqua",{0,0xff,0xff}},
	{"red",{0xff,0,0}},
	{"fuchsia",{0xff,0,0xff}},
	{"yellow",{0xff,0xff,0}},
	{"white",{0xff,0xff,0xff}}
};
int main() {
	string s;
	while (cin >> s, s != "0") {
		int r, g, b;
		sscanf(s.data(), "%*c%2x%2x%2x", &r, &g, &b);
		int Min = INT_MAX;
		string ans;
		for (auto p : mp) {
			int d = abs((r - p.second.r)*(r - p.second.r) + (g - p.second.g)*(g - p.second.g) + (b - p.second.b)*(b - p.second.b));
			if (d < Min) {
				Min = d;
				ans = p.first;
			}
		}
		cout << ans << endl;
	}
}