#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
int main() {
	while (1) {
		string st; cin >> st;
		map<int, string>mp;
		mp[0] = "black";
		mp[1] = "blue";
		mp[2] = "lime";
		mp[3] = "aqua";
		mp[4] = "red";
		mp[5] = "fuchsia";
		mp[6] = "yellow";
		mp[7] = "white";
		if (st == "0")break;
		else {
			int red = stoi(st.substr(1, 2), nullptr, 16);
			int gre = stoi(st.substr(3, 2), nullptr, 16);
			int blu = stoi(st.substr(5, 2), nullptr, 16);
			int num = (red > 127) * 4 + (gre > 127) * 2 + (blu > 127);
			cout << mp[num] << endl;
		}
	}
	return 0;
}