# define _CRT_SECUREj_NO_WARNINGS 1
# define _USE_MATH_DEFINES
# include <iostream>
# include <numeric>
# include <string>
# include <bitset>
# include <vector>
# include <algorithm>
# include <cstdlib>
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <iomanip>
# include <queue>
# include <sstream>
# include <climits>
# include <cmath>
# include <list>
# include <functional>
# include <string>
# include <ctime>
# include <set>
# include <forward_list>
# include <map>
# include <stack>
using namespace std;
# define INF ((int)(1<<25))
# define REP(i,n) for(int i=0;i<(int)n;i++)
# define FOR(i,n) REP(i,n)
# define FORI(i,k,n) for(int i=k;i<(int)n;i++)
# define TORAD 2.0*M_PI/360.0
# define INT(x) int x;cin>>x;
# define ALL(x) (x).begin(),(x).end()
# define RALL(x) (x).rbegin(),(x).rend()
# define DEBUG(x) cout<<#x<<":"<<x<<endl;
# define EPS 1e-12
#ifdef _MSC_VER
#include <intrin.h>
#define __builtin_popcount __popcnt
#endif
typedef long long lint;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<int, pii> piii;
const int dx[4] = { 0,1,0,-1 }, dy[4] = { -1,0,1,0 };
template<class T> void debug(T a) { for (auto i : a)cout << i << endl; }

int main()
{
	string a;
	int FF = 16 * 16 - 1;
	int f[][3] = { { FF,FF,FF },{ FF,FF,0 },{ FF,0,FF },{ FF,0,0 },{ 0,FF,FF },{ 0,FF,0 },{ 0,0,FF },{ 0,0,0 } };
	string ans[] = { "white","yellow","fuchsia","red","aqua","lime","blue","black" };
	while (cin >> a&&a != "0")
	{
		int g[3];
		FOR(i, 3)g[i] = strtol(a.substr(i * 2 + 1,2).c_str(),NULL,16);
		int d = INT_MAX, id = 0;
		FOR(i, 8)
		{
			double D = 0;
			FOR(j, 3)
			{
				D += pow(f[i][j] - g[j], 2);
			}
			if (D <= d)
			{
				d = D;
				id = i;
			}
		}
		cout << ans[id] << endl;

	}
}