// 2011/02/19 Tazoe

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

int main()
{
	while(true){
		string col;
		cin >> col;
		if(col=="0")
			break;

		if(col[1]>='0'&&col[1]<='7')
			if(col[3]>='0'&&col[3]<='7')
				if(col[5]>='0'&&col[5]<='7')
					cout << "black" << endl;
				else
					cout << "blue" << endl;
			else
				if(col[5]>='0'&&col[5]<='7')
					cout << "lime" << endl;
				else
					cout << "aqua" << endl;
		else
			if(col[3]>='0'&&col[3]<='7')
				if(col[5]>='0'&&col[5]<='7')
					cout << "red" << endl;
				else
					cout << "fuchsia" << endl;
			else
				if(col[5]>='0'&&col[5]<='7')
					cout << "yellow" << endl;
				else
					cout << "white" << endl;
	}

	return 0;
}