S=input()
l=S.split('/')
if int(l[0])<=2019:
    if int(l[1])<=4:
        if int(l[2])<=30:
            print('Heisei')
            exit()
    print('TBD') S=input() S input() input l=S.split('/') l S.split('/') S.split S split '/' if int(l[0])<=2019:
    if int(l[1])<=4:
        if int(l[2])<=30:
            print('Heisei')
            exit()
    print('TBD') int(l[0])<=2019 int(l[0]) int l[0] l 0 2019 if int(l[1])<=4:
        if int(l[2])<=30:
            print('Heisei')
            exit()
     int(l[1])<=4 int(l[1]) int l[1] l 1 4 if int(l[2])<=30:
            print('Heisei')
            exit()
     int(l[2])<=30 int(l[2]) int l[2] l 2 30 print('Heisei') print 'Heisei' exit() exit print('TBD') print 'TBD' S=input() input() S l=S.split('/') S.split('/') l
S=input()
l=S.split('/')
if int(l[0])<=2019:
    if int(l[1])<=4:
        if int(l[2])<=30:
            print('Heisei')
            exit()
    print('TBD')