#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

typedef long long ll;
typedef pair<int,string> pis;
vector<pis> v;

template<class T>
T sqr(T a) { return a * a; }

int main() {
	string s;

	v.push_back(pis(0x000000, "black"));
	v.push_back(pis(0x0000ff, "blue"));
	v.push_back(pis(0x00ff00, "lime"));
	v.push_back(pis(0x00ffff, "aqua"));
	v.push_back(pis(0xff0000, "red"));
	v.push_back(pis(0xff00ff, "fuchsia"));
	v.push_back(pis(0xffff00, "yellow"));
	v.push_back(pis(0xffffff, "white"));

	while(cin >> s, s[0]-'0') {
		int a = 0;
		for(int i = 0; i < 6; i++) {
			a *= 16;
			if(0 <= s[i+1] && s[i+1] <= '9')
				a += s[i+1] - '0';
			else
				a += s[i+1] - 'a' + 10;
		}

		int res = -1;
		ll mn = 1e9;
		for(int i = 0; i < v.size(); i++) {
			ll tmp = 0;
			for(int j = 0; j < 3; j++) {
				tmp += sqr(((v[i].first >> (j * 8)) & 0xff) - ((a >> (j * 8)) & 0xff));
			}
			if(tmp < mn) {
				mn = tmp;
				res = i;
			}
		}
		cout << v[res].second << endl;
	}
}