S = input()

now = int(S[5:7]+S[8:10])
if now <= 430:
    print("Heisei")
else:
    print("TBD") S = input() S input() input now = int(S[5:7]+S[8:10]) now int(S[5:7]+S[8:10]) int S[5:7]+S[8:10] S[5:7] S 5:7 5 7 S[8:10] S 8:10 8 10 if now <= 430:
    print("Heisei")
else:
    print("TBD") now <= 430 now 430 print("Heisei") print "Heisei" print("TBD") print "TBD" S = input() input() S now = int(S[5:7]+S[8:10]) int(S[5:7]+S[8:10]) now
S = input()

now = int(S[5:7]+S[8:10])
if now <= 430:
    print("Heisei")
else:
    print("TBD")
