#include <bits/stdc++.h>

using namespace std;

const int RGB[8][3] = {
	{ 0   ,0   ,0   },
	{ 0   ,0   ,255 },
	{ 0   ,255 ,0   },
	{ 0   ,255 ,255 },
	{ 255 ,0   ,0   },
	{ 255 ,0   ,255 },
	{ 255 ,255 ,0   },
	{ 255 ,255 ,255 },
};

const string COLOR[8] = {
	"black",
	"blue",
	"lime",
	"aqua",
	"red",
	"fuchsia",
	"yellow",
	"white",
};

int main() {
	int len, d, j, minD, index;
	int rgb[3];
	string colorInfo, tmp;
	stringstream ss;

	while (cin >> colorInfo, colorInfo[0] == '#') {
		len = colorInfo.size() - 1;

		for (int i = 1, j = 0; i < len; i += 2) {
			ss.clear();
			ss.str("");

			ss << colorInfo[i] << colorInfo[i + 1];
			ss >> tmp;
			//cout << tmp << endl;
			rgb[j++] = strtol(tmp.c_str(), 0, 16);
		}

		minD = INT_MAX;
		for (j = 0; j < 8; j++) {
			d = pow(rgb[0] - RGB[j][0], 2) + pow(rgb[1] - RGB[j][1], 2) + pow(rgb[2] - RGB[j][2], 2);
			if (d < minD) {
				minD = d;
				index = j;
			}
		}

		cout << COLOR[index] << endl;

	}

	return 0;
}
