s=input()
year=s[:4]
month=s[5:7]
day=s[8:]
s2=int(year+month+day)
if s2<=20190430:
    print("Heisei")
else:
    print("TBD") s=input() s input() input year=s[:4] year s[:4] s :4 4 month=s[5:7] month s[5:7] s 5:7 5 7 day=s[8:] day s[8:] s 8: 8 s2=int(year+month+day) s2 int(year+month+day) int year+month+day year+month year month day if s2<=20190430:
    print("Heisei")
else:
    print("TBD") s2<=20190430 s2 20190430 print("Heisei") print "Heisei" print("TBD") print "TBD" year=s[:4] s[:4] year day=s[8:] s[8:] day month=s[5:7] s[5:7] month s2=int(year+month+day) int(year+month+day) s2 s=input() input() s
s=input()
year=s[:4]
month=s[5:7]
day=s[8:]
s2=int(year+month+day)
if s2<=20190430:
    print("Heisei")
else:
    print("TBD")