#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <climits>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main(){
	string color[8] = {"black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white"};
	int range[8][3] = {{0, 0, 0}, {0, 0, 255}, {0, 255, 0}, {0, 255, 255},
	{255, 0, 0}, {255, 0, 255}, {255, 255, 0}, {255, 255, 255}};
	char s;
	int a, b, c;
	while(scanf(" %c", &s)) {
		if(s == '0') break;
		scanf("%2x%2x%2x", &a, &b, &c);
		int ret = INT_MAX, ans = 0;
		rep(i,8) {
			int buf = (a-range[i][0])*(a-range[i][0]) + (b-range[i][1])*(b-range[i][1]) 
				+ (c-range[i][2])*(c-range[i][2]);
			if(ret > buf) {
				ret = buf;
				ans = i;
			}
		}
		cout << color[ans] << endl;
	}
	return 0;
}