s = input()
m = s.split("/")[1]
d = s.split("/")[2]

if int(m) < 5:
    print("Heisei")
else:
    print("TBD") s = input() s input() input m = s.split("/")[1] m s.split("/")[1] s.split("/") s.split s split "/" 1 d = s.split("/")[2] d s.split("/")[2] s.split("/") s.split s split "/" 2 if int(m) < 5:
    print("Heisei")
else:
    print("TBD") int(m) < 5 int(m) int m 5 print("Heisei") print "Heisei" print("TBD") print "TBD" m = s.split("/")[1] s.split("/")[1] m s = input() input() s d = s.split("/")[2] s.split("/")[2] d
s = input()
m = s.split("/")[1]
d = s.split("/")[2]

if int(m) < 5:
    print("Heisei")
else:
    print("TBD")