#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <sstream>
#include <climits>
#include <cfloat>
#include <complex>

using namespace std;

int main()
{
	char* colors[] = { "black", "blue", "lime", "aqua"
		, "red", "fuchsia", "yellow", "white" };
	char buf[16];
	while (cin.getline(buf, sizeof(buf)), *buf != '0')
	{
		int r, g, b;
		sscanf(buf, "#%2x%2x%2x", &r, &g, &b);
		char* ans;
		double mind = 1e10;
		for (int i = 0; i < 8; ++i)
		{
			double rr = (i >> 2 & 1) * 0xff;
			double gg = (i >> 1 & 1) * 0xff;
			double bb = (i & 1) * 0xff;
			double d = sqrt((rr-r)*(rr-r) + (gg-g)*(gg-g) + (bb-b)*(bb-b));
			if (d < mind)
			{
				mind = d;
				ans = colors[i];
			}
		}
		puts(ans);
	}

	return 0;
}