s=input()
man=int(s[5:7])
day=int(s[8:])
if man<=4 and day<=30:
    print("Heisei")
else:
    print("TBD") s=input() s input() input man=int(s[5:7]) man int(s[5:7]) int s[5:7] s 5:7 5 7 day=int(s[8:]) day int(s[8:]) int s[8:] s 8: 8 if man<=4 and day<=30:
    print("Heisei")
else:
    print("TBD") man<=4 and day<=30 man<=4 man 4 day<=30 day 30 print("Heisei") print "Heisei" print("TBD") print "TBD" s=input() input() s day=int(s[8:]) int(s[8:]) day man=int(s[5:7]) int(s[5:7]) man
s=input()
man=int(s[5:7])
day=int(s[8:])
if man<=4 and day<=30:
    print("Heisei")
else:
    print("TBD")
