S=input()
if S[5]=="0" and int(S[6])<=4:
    print("Heisei")
else:
    print("TBD") S=input() S input() input if S[5]=="0" and int(S[6])<=4:
    print("Heisei")
else:
    print("TBD") S[5]=="0" and int(S[6])<=4 S[5]=="0" S[5] S 5 "0" int(S[6])<=4 int(S[6]) int S[6] S 6 4 print("Heisei") print "Heisei" print("TBD") print "TBD" S=input() input() S
S=input()
if S[5]=="0" and int(S[6])<=4:
    print("Heisei")
else:
    print("TBD")
