var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
var color="black,blue,lime,aqua,red,fuchsia,yellow,white".split(",");
for(var i=0;i<Arr.length;i++){
   if(Arr[i]=="0")break;
   var str=Arr[i].slice(1);
   var arr=[];
   str.replace(/(..)/g,function(v){
      arr.push(parseInt(v,16));
   });
   var r=arr[0];
   var g=arr[1];
   var b=arr[2];
   var R=Math.pow(r-255,2);
   var G=Math.pow(g-255,2);
   var B=Math.pow(b-255,2);
   var abc=[];
   abc.push(Math.sqrt(r*r+g*g+b*b));
   abc.push(Math.sqrt(r*r+g*g+B));
   abc.push(Math.sqrt(r*r+G+b*b));
   abc.push(Math.sqrt(r*r+G+B));
   abc.push(Math.sqrt(R+g*g+b*b));
   abc.push(Math.sqrt(R+g*g+B));
   abc.push(Math.sqrt(R+G+b*b));
   abc.push(Math.sqrt(R+G+B));
   var min=Math.min.apply(null,abc);
   console.log(color[abc.indexOf(min)]);
}