ifile = open ("DATA1.txt", "r")
ofile = open ("OUT1.txt", "w")


def check(day, month, year):
    
    if year < 1998:
        if month < 11:
            if day < 28:
                return "old enough"
    return "too young"

for case in range(5):
    day, month, year = ((ifile.readline()).strip("\n")).split()
    day = int(day)
    month = int(month)
    year = int(year)
    ofile.write(check(day, month, year) + "\n")

ofile.close()
ifile.close()


