#include<iostream>
#include<cstdio>
#include<climits>
using namespace std;

int main(){
	char pn[8][10] = {"black","blue","lime","aqua","red","fuchsia","yellow","white"};
	int pR[8] = {0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff},
		pG[8] = {0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff},
		pB[8] = {0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff};
	char c;
	while(scanf(" %c",&c),c!='0'){
		int N; scanf("%x",&N);
		int R = N/(1<<16)%(16*16), G = N/(1<<8)%(16*16), B = N/(1<<0)%(16*16);
		int min_ = INT_MAX,ans;
		for(int i=0;i<8;i++){
			int dR = pR[i]-R, dG = pG[i]-G, dB = pB[i]-B;
			int d = dR*dR+dG*dG+dB*dB;
			if(d<min_){
				min_ = d; ans = i;
			}
		}
		printf("%s\n",pn[ans]);
	}
	return 0;
}