#include <iostream>
#include <climits>

int distsq(int r, int g, int b, int r_, int g_, int b_)
{
	return (r-r_)*(r-r_) + (g-g_)*(g-g_) + (b-b_)*(b-b_);
}

int main()
{
	std::string input;
	while (true) {
		getline(std::cin, input);
		if (input=="0") break;
		int r, g, b;
		r = std::stoi(input.substr(1,2), nullptr, 16);
		g = std::stoi(input.substr(3,2), nullptr, 16);
		b = std::stoi(input.substr(5,2), nullptr, 16);
		int min_d = INT_MAX;
		std::string res;
		if (min_d > distsq(r,g,b,0,0,0)) {
			min_d = distsq(r,g,b,0,0,0);
			res = "black";
		}
		if (min_d > distsq(r,g,b,0,0,255)) {
			min_d = distsq(r,g,b,0,0,255);
			res = "blue";
		}
		if (min_d > distsq(r,g,b,0,255,0)) {
			min_d = distsq(r,g,b,0,255,0);
			res = "lime";
		}
		if (min_d > distsq(r,g,b,0,255,255)) {
			min_d = distsq(r,g,b,0,255,255);
			res = "aqua";
		}
		if (min_d > distsq(r,g,b,255,0,0)) {
			min_d = distsq(r,g,b,255,0,0);
			res = "red";
		}
		if (min_d > distsq(r,g,b,255,0,255)) {
			min_d = distsq(r,g,b,255,0,255);
			res = "fuchsia";
		}
		if (min_d > distsq(r,g,b,255,255,0)) {
			min_d = distsq(r,g,b,255,255,0);
			res = "yellow";
		}
		if (min_d > distsq(r,g,b,255,255,255)) {
			min_d = distsq(r,g,b,255,255,255);
			res = "white";
		}
		std::cout << res << std::endl;
	}
	return 0;
}

