s=input()
l=list(map(int,s.split("/")))
if l[0] <=2018 or l[0] ==2019 and (l[1]<=3 or l[1] ==4 and l[2]<=30):
    print('Heisei')
else:
    print("TBD") s=input() s input() input l=list(map(int,s.split("/"))) l list(map(int,s.split("/"))) list map(int,s.split("/")) map int s.split("/") s.split s split "/" if l[0] <=2018 or l[0] ==2019 and (l[1]<=3 or l[1] ==4 and l[2]<=30):
    print('Heisei')
else:
    print("TBD") l[0] <=2018 or l[0] ==2019 and (l[1]<=3 or l[1] ==4 and l[2]<=30) l[0] <=2018 l[0] l 0 2018 l[0] ==2019 and (l[1]<=3 or l[1] ==4 and l[2]<=30) l[0] ==2019 l[0] l 0 2019 l[1]<=3 or l[1] ==4 and l[2]<=30 l[1]<=3 l[1] l 1 3 l[1] ==4 and l[2]<=30 l[1] ==4 l[1] l 1 4 l[2]<=30 l[2] l 2 30 print('Heisei') print 'Heisei' print("TBD") print "TBD" s=input() input() s l=list(map(int,s.split("/"))) list(map(int,s.split("/"))) l
s=input()
l=list(map(int,s.split("/")))
if l[0] <=2018 or l[0] ==2019 and (l[1]<=3 or l[1] ==4 and l[2]<=30):
    print('Heisei')
else:
    print("TBD")