a = input()
b = input()
c = input()
if a =="black" and b =="black" and c == "green":
print('black')
print('black')
print('GREEN')
elif a =="black" and b =="black" and c == "GREEN":
print('black')
print('yellow')
print('black')
elif a =="black" and b =="yellow" and c == "black":
print('red')
print('black')
print('black')
elif a =="red" and b =="black" and c == "black":
print('red')
print('yellow')
print('black')
elif a =="red" and b =="yellow" and c == "black":
print('black')
print('black')
print('green')
elif a =="black" and b =="YELLOW" and c == "black":
print('black')
print('YELLOW')
print('black')
else:
print('error')