#include<stdio.h>
#include<iostream>
#include<string>
#include<algorithm>
#include <vector>
#include<math.h>
#include<iomanip>
#include<set>


using namespace std;

int a[10][4]={{0,0,0,0},{0,0,255},{0,255,0},{0,255,255},{255,0,0},{255,0,255},{255,255,0},{255,255,255}};
int main(){


	
	while(1){
	string p;
	cin>>p;if(p=="0")return 0;

	int Y[15]={};
	for(int i=1;i<p.size();i++){
		if(p[i]>='0'&&p[i]<='9')Y[i]=p[i]-'0';
		else {Y[i]=10;Y[i]+=p[i]-'a';
		}
	}
	int X[5]={};
	for(int i=0;i<3;i++){
		X[i]+=16*Y[2*i+1];
		X[i]+=Y[2*i+2];
	}
	double ans=0,Bst=9999999;
	int k=0;
	double c0=X[0],c1=X[1],c2=X[2];
	for(int i=0;i<8;i++){
		double A=a[i][0]-c0,B=a[i][1]-c1,C=a[i][2]-c2;
		
		ans=sqrt(A*A+B*B+C*C);

		if(ans<Bst){Bst=ans;k=i;}
	}
	if(k==7)cout<<"white"<<endl;
	else if(k==6)cout<<"yellow"<<endl;
	else if(k==5)cout<<"fuchsia"<<endl;
	else if(k==4)cout<<"red"<<endl;
	else if(k==3)cout<<"aqua"<<endl;
	else if(k==2)cout<<"lime"<<endl;
	else if(k==1)cout<<"blue"<<endl;
	else if(k==0)cout<<"black"<<endl;

	}
	}