#include <iostream>
#include <vector>
#include <sstream>
#include <climits>
//#include <fstream>

using namespace std;

int hex2dec (char c)
{
	if (isdigit(c) ){
		return (c - '0');
	} // end if
	return (c - 'a' + 10 );
}

int main()
{
	const string color[] = {
"black",//	 00	 00	 00
"blue",//	 00	 00	 ff
"lime",//	 00	 ff	 00
"aqua",//	 00	 ff	 ff
"red",//	 ff	 00	 00
"fuchsia",// ff	 00	 ff
"yellow",//	 ff	 ff	 00
"white"//	 ff	 ff	 ff
};
	const int code[][3] = {
/* black */	 {0x00, 0x00, 0x00 },
/* blue */	 {0x00, 0x00,	0xff },
/* lime */	 {0x00, 0xff,	0x00 },
/* aqua */	 {0x00, 0xff,	0xff },
/* red	*/	 {0xff, 0x00,	0x00 },
/* fuchsia */  {0xff, 0x00,	0xff },
/* yellow */	 {0xff, 0xff,	0x00 },
/* white */	 {0xff, 0xff,	0xff }
};

//	cut here before submit 
//	freopen ("testcase.whatcolor", "r", stdin );
	string str = "";

	while (getline (cin, str ) ){
		int len = str.length();

		if (len == 1 && str[0] == '0'){
			break;
		} // end if

		vector <int> C (3, 0 ); // Red, Green, Blue order
		int i,j;

		for (i = 0; i < 3; ++i){
			C[i] = hex2dec(str[2*i+1])*16 + hex2dec(str[2*i+2]);
		} // end for

		int minV = INT_MAX;
		int res = -1;
		for (i = 0; i	< sizeof (color)/sizeof(color[0] ); ++i){
			int dd = 0;
			for (j = 0; j < 3; ++j){
				dd += (code[i][j] - C[j])*(code[i][j] - C[j]);
			} // end for
			
			if (minV > dd ){
				minV = dd;
				res = i;
			} // end if
		} // end for
		
		cout << color[res] << endl;

	} // end loop
		
	return 0;
}