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

int main()
{
	string s, t[8] = { "black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white" };

	cin >> s;

	while (s != "0") {
		int r, g, b, i = 0;

		r = stoi(s.substr(1, 2), nullptr, 16);
		g = stoi(s.substr(3, 2), nullptr, 16);
		b = stoi(s.substr(5, 2), nullptr, 16);

		if (r > 127)
			i += 4;
		if (g > 127)
			i += 2;
		if (b > 127)
			i += 1;

		cout << t[i] << endl;
		
		cin >> s;
	}

	return 0;
}
