data=open('DATA1.txt','r')
out=open('OUT1.txt','w')
for x in range(0,5):
    age=data.readline().rstrip('\n').split(' ')
    for x in range(0,3):
        age[x]=int(age[x])
    
    if age[0]<=27 and age[1]==10 and age[2]==1997:
        put=True
    elif age[1] <10 and age[2]==1997:
        put=True
    elif age[2]<1997:
        put=True
    else:
        put=False
    if put:
        out.write("old enough\n")
    else:
        out.write("too young\n")
data.close()
out.close()

