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

char l[6];
string s;

string color() {
	for (int i = 0; i < 6; i++) {
		l[i] = s[i + 1];
	}
	int r, g, b;
	int z[6];

	for (int i = 0; i < 6; i++) {
		if (l[i] == '0') {
			z[i] = 0;
		}
		else if (l[i] == '1') {
			z[i] = 1;
		}
		else if (l[i] == '2') {
			z[i] = 2;
		}
		else if (l[i] == '3') {
			z[i] = 3;
		}
		else if (l[i] == '4') {
			z[i] = 4;
		}
		else if (l[i] == '5') {
			z[i] = 5;
		}
		else if (l[i] == '6') {
			z[i] = 6;
		}
		else if (l[i] == '7') {
			z[i] = 7;
		}
		else if (l[i] == '8') {
			z[i] = 8;
		}
		else if (l[i] == '9') {
			z[i] = 9;
		}
		else if (l[i] == 'a') {
			z[i] = 10;
		}
		else if (l[i] == 'b') {
			z[i] = 11;
		}
		else if (l[i] == 'c') {
			z[i] = 12;
		}
		else if (l[i] == 'd') {
			z[i] = 13;
		}
		else if (l[i] == 'e') {
			z[i] = 14;
		}
		else if (l[i] == 'f') {
			z[i] = 15;
		}
	}

	r = z[0] * 16 + z[1];
	g = z[2] * 16 + z[3];
	b = z[4] * 16 + z[5];

	//ff == 255;
	if (r <= 128) {
		//black,blue,lime,aqua
		if (g <= 128) {
			//black,blue
			if (b <= 128) {
				return "black";
			}
			else {
				return "blue";
			}
		}
		else {
			//lime,aqua
			if (b <= 128) {
				return "lime";
			}
			else {
				return "aqua";
			}
		}
	}
	else {
		//red,fuchsia,yellow,white
		if (g <= 128) {
			//red,fu
			if (b <= 128) {
				return "red";
			}
			else {
				return "fuchsia";
			}
		}
		else {
			if (b <= 128) {
				return "yellow";
			}
			else
			{
				return "white";
			}
		}
	}
}

int main() {
	string g[100];
	int x;
	for (int i = 0;; i++){
		cin >> s;
		if (s == "0") {
			x = i;
			break;
		}
		g[i] = color();
	}
	for (int i = 0; i < x; i++){
		cout << g[i] << endl;
	}
	return 0;
}