#include<cstdlib>
char nm[][9]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};
int cl[][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 rgb[3][3];
int main(){
	while(scanf(" #%2s%2s%2s",rgb,rgb+1,rgb+2)==3){
		int mn=99999999,mi,d2,d;
		for(int i=0;i<8;i++){
			d2=0;
			for(int j=0;j<3;j++)d=cl[i][j]-strtol(rgb[j],NULL,16),d*=d,d2+=d;
			if(d2<mn)mn=d2,mi=i;
		}
		printf("%s\n",nm[mi]);
	}
	return 0;
}