Taro, who aims to become a web designer, is currently training. My senior at the office tells me that the background color of this page is # ffe085, which is a color number peculiar to web design, but I can't think of what kind of color it is.

This color number represents the intensity of each of the three primary colors of light, red, green, and blue. Specifically, it is a combination of three 2-digit hexadecimal numbers, and when the color number is “#RGB”, R is the intensity of red, G is the intensity of green, and is the intensity of blue. .. Each value is from 00 to ff.

For Taro who is not familiar with color numbers, please create a program that inputs the color number and outputs the name of the closest color from the color table. The table of colors used is as follows.

| Color name | Red intensity | Green intensity | Blue intensity
--- | --- | --- | --- | ---
| black | 00 | 00 | 00
| blue | 00 | 00 | ff
| lime | 00 | ff | 00
aqua | 00 | ff | ff
| red | ff | 00 | 00
| fuchsia | ff | 00 | ff
| yellow | ff | ff | 00
| white | ff | ff | ff




The "closest color" is defined as follows. When the intensities of red, green, and blue at a given color number are R, G, and B, respectively, and the intensities of red, green, and blue of the kth color in the table are Rk, Gk, and Bk, respectively. The color with the smallest dk value calculated by the following formula is the closest color.

<image>



If there are multiple colors with the same dk value, the color at the top of the table will be the closest color.



Input

A sequence of multiple datasets is given as input. The end of the input is indicated by a single line of zeros. For each dataset, a string representing the color number is given on one line in #RGB format.

The number of datasets does not exceed 1000.

Output

Outputs the name of the closest color for each dataset on one line.

Examples

Input

#ffe085
#787878
#decade
#ff55ff
0


Output

white
black
white
fuchsia


Input

ffe085
787878
decade
ff55ff
0


Output

white
black
white
fuchsia

Source: aizu | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
COLOR = {'000000': 'black', '0000ff': 'blue', '00ff00': 'lime', '00ffff': 'aqua', 'ff0000': 'red', 'ff00ff': 'fuchsia', 'ffff00': 'yellow', 'ffffff': 'white'}
while True:
	input_data = input()
	if len(input_data) == 1:
		break
	color_code = ''
	for (first, second) in zip(input_data[1::2], input_data[2::2]):
		if int(first + second, 16) <= 127:
			color_code += '00'
		else:
			color_code += 'ff'
	print(COLOR[color_code])


color = [['black', 0, 0, 0], ['blue', 0, 0, 255], ['lime', 0, 255, 0], ['aqua', 0, 255, 255], ['red', 255, 0, 0], ['fuchsia', 255, 0, 255], ['yellow', 255, 255, 0], ['white', 255, 255, 255]]
while True:
	a = list(input())
	if a[0] == '0':
		break
	(r, g, b) = (int(a[1] + a[2], 16), int(a[3] + a[4], 16), int(a[5] + a[6], 16))
	vmin = 3 * 255 ** 2
	for i in color:
		d = (r - i[1]) ** 2 + (g - i[2]) ** 2 + (b - i[3]) ** 2
		if d < vmin:
			(j, vmin) = (i, d)
	print(j[0])


from collections import OrderedDict
colors = OrderedDict()
colors['black'] = [0, 0, 0]
colors['blue'] = [0, 0, 255]
colors['lime'] = [0, 255, 0]
colors['aqua'] = [0, 255, 255]
colors['red'] = [255, 0, 0]
colors['fuchsia'] = [255, 0, 255]
colors['yellow'] = [255, 255, 0]
colors['white'] = [255, 255, 255]
while True:
	color = input()
	if color == '0':
		break
	(r, g, b) = (int(color[1:3], 16), int(color[3:5], 16), int(color[5:7], 16))
	near_color = ['', float('inf')]
	for (k, v) in colors.items():
		dk = ((v[0] - r) ** 2 + (v[1] - g) ** 2 + (v[2] - b) ** 2) ** 0.5
		if dk < near_color[1]:
			near_color = [k, dk]
	print(near_color[0])


import math
sample1 = [[0, 0, 0], [0, 0, 255], [0, 255, 0], [0, 255, 255], [255, 0, 0], [255, 0, 255], [255, 255, 0], [255, 255, 255]]
sample2 = ['black', 'blue', 'lime', 'aqua', 'red', 'fuchsia', 'yellow', 'white']
while True:
	color = input()
	if color == '0':
		break
	Color = list(color)
	Color.pop(0)
	for i in range(6):
		if Color[i] == 'a':
			Color.pop(i)
			Color.insert(i, 10)
		if Color[i] == 'b':
			Color.pop(i)
			Color.insert(i, 11)
		if Color[i] == 'c':
			Color.pop(i)
			Color.insert(i, 12)
		if Color[i] == 'd':
			Color.pop(i)
			Color.insert(i, 13)
		if Color[i] == 'e':
			Color.pop(i)
			Color.insert(i, 14)
		if Color[i] == 'f':
			Color.pop(i)
			Color.insert(i, 15)
	R = int(Color[0]) * 16 + int(Color[1])
	G = int(Color[2]) * 16 + int(Color[3])
	B = int(Color[4]) * 16 + int(Color[5])
	D = []
	for i in range(8):
		d = math.sqrt((R - sample1[i][0]) ** 2 + (G - sample1[i][1]) ** 2 + (B - sample1[i][2]) ** 2)
		D.append(d)
	dmin = min(D)
	index = D.index(dmin)
	print(sample2[index])


color = {'black': '#000000', 'blue': '#0000ff', 'lime': '#00ff00', 'aqua': '#00ffff', 'red': '#ff0000', 'fuchsia': '#ff00ff', 'yellow': '#ffff00', 'white': '#ffffff'}

def list_chunk(arr, n):
	return [arr[i:i + 3] for i in range(0, 15, n)]

def code2rgb(code):
	code = code.lstrip('#')
	(r, g, b) = [code[i:i + 2] for i in range(0, len(code), 2)]
	return [int(v, 16) for v in [r, g, b]]

def dk2(a, b):
	return sum([(a[i] - b[i]) ** 2 for i in range(0, 3)])
while True:
	v = input()
	if v is '0':
		break
	rgb = code2rgb(v)
	dks = [dk2(code2rgb(c), rgb) for c in color.values()]
	k = list(color.keys())
	print(k[dks.index(min(dks))])


import math
while True:
	q = input()
	if q == '0':
		break
	else:
		Color = ['black', 'blue', 'lime', 'aqua', 'red', 'fuchsia', 'yellow', 'white']
		f = int('ff', 16)
		r = int(q[1] + q[2], 16)
		g = int(q[3] + q[4], 16)
		b = int(q[5] + q[6], 16)
		d1 = math.sqrt(r ** 2 + g ** 2 + b ** 2)
		d2 = math.sqrt(r ** 2 + g ** 2 + (b - f) ** 2)
		d3 = math.sqrt(r ** 2 + (g - f) ** 2 + b ** 2)
		d4 = math.sqrt(r ** 2 + (g - f) ** 2 + (b - f) ** 2)
		d5 = math.sqrt((r - f) ** 2 + g ** 2 + b ** 2)
		d6 = math.sqrt((r - f) ** 2 + g ** 2 + (b - f) ** 2)
		d7 = math.sqrt((r - f) ** 2 + (g - f) ** 2 + b ** 2)
		d8 = math.sqrt((r - f) ** 2 + (g - f) ** 2 + (b - f) ** 2)
		D = [d1, d2, d3, d4, d5, d6, d7, d8]
		d = min(D)
		print(Color[D.index(d)])


import math

def solve(line):
	R = int(line[1:3], 16)
	G = int(line[3:5], 16)
	B = int(line[5:7], 16)
	sa_black = math.sqrt(R ** 2 + G ** 2 + B ** 2)
	sa_max = sa_black
	ans_color = 'black'
	sa_blue = math.sqrt(R ** 2 + G ** 2 + (B - 255) ** 2)
	if sa_blue < sa_max:
		sa_max = sa_blue
		ans_color = 'blue'
	sa_lime = math.sqrt(R ** 2 + (G - 255) ** 2 + B ** 2)
	if sa_lime < sa_max:
		sa_max = sa_lime
		ans_color = 'lime'
	sa_aqua = math.sqrt(R ** 2 + (G - 255) ** 2 + (B - 255) ** 2)
	if sa_aqua < sa_max:
		sa_max = sa_aqua
		ans_color = 'aqua'
	sa_red = math.sqrt((R - 255) ** 2 + G ** 2 + B ** 2)
	if sa_red < sa_max:
		sa_max = sa_red
		ans_color = 'red'
	sa_fuchsia = math.sqrt((R - 255) ** 2 + G ** 2 + (B - 255) ** 2)
	if sa_fuchsia < sa_max:
		sa_max = sa_fuchsia
		ans_color = 'fuchsia'
	sa_yellow = math.sqrt((R - 255) ** 2 + (G - 255) ** 2 + B ** 2)
	if sa_yellow < sa_max:
		sa_max = sa_yellow
		ans_color = 'yellow'
	sa_white = math.sqrt((R - 255) ** 2 + (G - 255) ** 2 + (B - 255) ** 2)
	if sa_white < sa_max:
		sa_max = sa_white
		ans_color = 'white'
	return ans_color
while True:
	line = input()
	if line == '0':
		break
	print(solve(line))


L = [[0, 'black', 0, 0, 0], [1, 'blue', 0, 0, 255], [2, 'lime', 0, 255, 0], [3, 'aqua', 0, 255, 255], [4, 'red', 255, 0, 0], [5, 'fuchsia', 255, 0, 255], [6, 'yellow', 255, 255, 0], [7, 'white', 255, 255, 255]]
while True:
	T = []
	s = input()
	if s == '0':
		break
	code = []
	for i in range(3):
		code.append(int(s[1 + 2 * i:3 + 2 * i], 16))
	for i in range(len(L)):
		m = 0
		for j in range(3):
			m += (L[i][2 + j] - code[j]) ** 2
		T.append([L[i][0], m])
	T.sort(key=lambda x: (x[1], x[0]))
	print(L[T[0][0]][1])


while True:
	N = input()
	if N == '0':
		break
	r = int(N[1:3], 16)
	g = int(N[3:5], 16)
	b = int(N[5:7], 16)
	ans = ''
	D = 255 * 255 * 3 + 1
	(R, G, B) = (0, 0, 0)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'black'
	(R, G, B) = (0, 0, 255)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'blue'
	(R, G, B) = (0, 255, 0)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'lime'
	(R, G, B) = (0, 255, 255)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'aqua'
	(R, G, B) = (255, 0, 0)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'red'
	(R, G, B) = (255, 0, 255)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'fuchsia'
	(R, G, B) = (255, 255, 0)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'yellow'
	(R, G, B) = (255, 255, 255)
	d = (R - r) ** 2 + (G - g) ** 2 + (B - b) ** 2
	if d < D:
		D = d
		ans = 'white'
	print(ans)


import math

def translate(color):
	ret = 0
	cnt = 0
	for c in color:
		if c == 'f':
			num = 15
		elif c == 'e':
			num = 14
		elif c == 'd':
			num = 13
		elif c == 'c':
			num = 12
		elif c == 'b':
			num = 11
		elif c == 'a':
			num = 10
		else:
			num = int(c)
		if cnt == 0:
			ret += num * 16
			cnt += 1
		else:
			ret += num
	return ret
color = ['black', 'blue', 'lime', 'aqua', 'red', 'fuchsia', 'yellow', 'white']
stlength = [[0, 0, 0], [0, 0, 255], [0, 255, 0], [0, 255, 255], [255, 0, 0], [255, 0, 255], [255, 255, 0], [255, 255, 255]]
while 1:
	n = input()
	if n == '0':
		break
	red = n[1:3]
	green = n[3:5]
	blue = n[5:7]
	red = translate(red)
	green = translate(green)
	blue = translate(blue)
	ans = 10 ** 9
	for (i, stl) in enumerate(stlength):
		distance = math.sqrt((stl[0] - red) ** 2 + (stl[1] - green) ** 2 + (stl[2] - blue) ** 2)
		if distance < ans:
			ans = distance
			name = color[i]
	print(name)


import math
while True:
	color = [[0, 0, 0], [0, 0, 255], [0, 255, 0], [0, 255, 255], [255, 0, 0], [255, 0, 255], [255, 255, 0], [255, 255, 255]]
	color_16 = input()
	if color_16 == '0':
		break
	color_R = int(color_16[1] + color_16[2], 16)
	color_G = int(color_16[3] + color_16[4], 16)
	color_B = int(color_16[5] + color_16[6], 16)
	min_d = 500
	for i in range(8):
		R = color[i][0]
		G = color[i][1]
		B = color[i][2]
		d = math.sqrt((R - color_R) ** 2 + (G - color_G) ** 2 + (B - color_B) ** 2)
		if min_d > d:
			min_d = d
			color_num = i
	if color_num == 0:
		print('black')
	elif color_num == 1:
		print('blue')
	elif color_num == 2:
		print('lime')
	elif color_num == 3:
		print('aqua')
	elif color_num == 4:
		print('red')
	elif color_num == 5:
		print('fuchsia')
	elif color_num == 6:
		print('yellow')
	else:
		print('white')


INF = 10 ** 10
dic = {}
for i in range(10):
	dic[str(i)] = i
for i in range(ord('a'), ord('f') + 1):
	dic[chr(i)] = i - ord('a') + 10

def hex_to_dec(s):
	return dic[s[0]] * 16 + dic[s[1]]
colors = [('black', list(map(hex_to_dec, ['00', '00', '00']))), ('blue', list(map(hex_to_dec, ['00', '00', 'ff']))), ('lime', list(map(hex_to_dec, ['00', 'ff', '00']))), ('aqua', list(map(hex_to_dec, ['00', 'ff', 'ff']))), ('red', list(map(hex_to_dec, ['ff', '00', '00']))), ('fuchsia', list(map(hex_to_dec, ['ff', '00', 'ff']))), ('yellow', list(map(hex_to_dec, ['ff', 'ff', '00']))), ('white', list(map(hex_to_dec, ['ff', 'ff', 'ff'])))]
while True:
	s = input()
	if s == '0':
		break
	(r, g, b) = map(hex_to_dec, [s[1:3], s[3:5], s[5:7]])
	lowest_name = 'KUWA'
	lowest_score = INF
	for (name, rgb) in colors:
		(rc, gc, bc) = rgb
		score = (r - rc) ** 2 + (g - gc) ** 2 + (b - bc) ** 2
		if score < lowest_score:
			(lowest_name, lowest_score) = (name, score)
	print(lowest_name)


COLOR = {'000000': 'black', '0000ff': 'blue', '00ff00': 'lime', '00ffff': 'aqua', 'ff0000': 'red', 'ff00ff': 'fuchsia', 'ffff00': 'yellow', 'ffffff': 'white'}
while True:
	s = input()
	if len(s) == 1:
		break
	color = ''
	for (first, second) in zip(s[1::2], s[2::2]):
		if int(first + second, 16) <= 127:
			color += '00'
		else:
			color += 'ff'
	print(COLOR[color])


import sys, math, os, bisect
PYDEV = os.environ.get('PYDEV')
if PYDEV == 'True':
	sys.stdin = open('sample-input.txt', 'rt')
colors = {'black': '#000000', 'blue': '#0000ff', 'lime': '#00ff00', 'aqua': '#00ffff', 'red': '#ff0000', 'fuchsia': '#ff00ff', 'yellow': '#ffff00', 'white': '#ffffff'}

def distance(cc1, cc2):
	r1 = int(cc1[1:3], 16)
	r2 = int(cc2[1:3], 16)
	g1 = int(cc1[3:5], 16)
	g2 = int(cc2[3:5], 16)
	b1 = int(cc1[5:], 16)
	b2 = int(cc2[5:], 16)
	return math.sqrt((r1 - r2) ** 2 + (g1 - g2) ** 2 + (b1 - b2) ** 2)

def get_color(cc):
	min_dist = float('Inf')
	for color in colors:
		dist = distance(cc, colors[color])
		if dist < min_dist:
			min_dist = dist
			best = color
	return best
while True:
	cc = input().strip()
	if cc[0] == '0':
		break
	print(get_color(cc))


color = {'000000': 'black', '0000ff': 'blue', '00ff00': 'lime', '00ffff': 'aqua', 'ff0000': 'red', 'ff00ff': 'fuchsia', 'ffff00': 'yellow', 'ffffff': 'white'}
while True:
	n = input()
	if n == '0':
		break
	code = ''
	for (f, s) in zip(n[1::2], n[2::2]):
		if int(f + s, 16) <= 127:
			code += '00'
		else:
			code += 'ff'
	print(color[code])


import sys
from sys import stdin
from collections import namedtuple
from math import sqrt
input = stdin.readline
color = namedtuple('color', ['name', 'r', 'g', 'b'])

def main(args):
	references = [color('black', 0, 0, 0), color('blue', 0, 0, 255), color('lime', 0, 255, 0), color('aqua', 0, 255, 255), color('red', 255, 0, 0), color('fuchsia', 255, 0, 255), color('yellow', 255, 255, 0), color('white', 255, 255, 255)]
	while True:
		data = input().strip()
		if data[0] == '0':
			break
		my_r = int(data[1:3], 16)
		my_g = int(data[3:5], 16)
		my_b = int(data[5:7], 16)
		distances = []
		for c in references:
			d = sqrt((c.r - my_r) ** 2 + (c.g - my_g) ** 2 + (c.b - my_b) ** 2)
			distances.append(d)
		closest_distance = min(distances)
		closest_color = distances.index(closest_distance)
		print(references[closest_color].name)
main(sys.argv[1:])


import sys
from sys import stdin
from collections import namedtuple
from math import sqrt
input = stdin.readline
color = namedtuple('color', ['name', 'r', 'g', 'b'])

def main(args):
	references = [color('black', 0, 0, 0), color('blue', 0, 0, 255), color('lime', 0, 255, 0), color('aqua', 0, 255, 255), color('red', 255, 0, 0), color('fuchsia', 255, 0, 255), color('yellow', 255, 255, 0), color('white', 255, 255, 255)]
	while True:
		data = input().strip()
		if data[0] == '0':
			break
		my_r = int(data[1:3], 16)
		my_g = int(data[3:5], 16)
		my_b = int(data[5:7], 16)
		distances = [(c.r - my_r) ** 2 + (c.g - my_g) ** 2 + (c.b - my_b) ** 2 for c in references]
		closest_distance = min(distances)
		closest_color = distances.index(closest_distance)
		print(references[closest_color].name)
main(sys.argv[1:])