// AOJ 0176
#include<algorithm>
#include<iostream>
#include<sstream>
#include<string>
#include<utility>

typedef std::pair<int, int> P;

const int INF = 1 << 30;

const int r[8] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff },
		  g[8] = { 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff },
		  b[8] = { 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff };

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

int sqr( int x )
{
	return x * x;
}

int main()
{
	std::string s;
	while( std::cin >> s, s != "0" )
	{
		std::string t;
		for( int i = 1; i != s.size(); ++i )
		{
			t += s[i];
			if( i % 2 == 0 && i < 6 )
			{
				t += ' ';
			}
		}

		std::istringstream iss( t );
		int R, G, B;
		iss >> std::hex >> R >> G >> B;

		P ans( INF, INF );
		for( int i = 0; i != 8; ++i )
		{
			int d = sqr( R - r[i] ) + sqr( G - g[i] ) + sqr( B - b[i] );
			ans = std::min( ans, P( d, i ) );
		}

		std::cout << cols[ans.second] << std::endl;
	}

	return 0;
}