#include<cstdio>

using namespace std;

int main(){
	char *color[]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};
	int rgb[][3]={{0x00,0x00,0x00},
				  {0x00,0x00,0xff},
				  {0x00,0xff,0x00},
				  {0x00,0xff,0xff},
				  {0xff,0x00,0x00},
				  {0xff,0x00,0xff},
				  {0xff,0xff,0x00},
				  {0xff,0xff,0xff}};

	for(char sam[8];scanf("%s",sam),sam[0]-'0';){
		int b;	sscanf(sam+5,"%x",&b);	sam[5]='\0';
		int g;	sscanf(sam+3,"%x",&g);	sam[3]='\0';
		int r;	sscanf(sam+1,"%x",&r);
		int dmin=1000000,imin;
		for(int i=0;i<8;i++){
			int dis=(r-rgb[i][0])*(r-rgb[i][0])+(g-rgb[i][1])*(g-rgb[i][1])+(b-rgb[i][2])*(b-rgb[i][2]);
			if(dis<dmin)	dmin=dis,imin=i;
		}
		puts(color[imin]);
	}

	return 0;
}