#! python3
#  solve_119_A.py

S = input()
date = S[0:4]+S[5:7]+S[8:10] #yyyymmdd式に変更

tag = 20190430

if int(date) <= 20190430:
    print("Heisei")
else:
    print("TBD") S = input() S input() input date = S[0:4]+S[5:7]+S[8:10] date S[0:4]+S[5:7]+S[8:10] S[0:4]+S[5:7] S[0:4] S 0:4 0 4 S[5:7] S 5:7 5 7 S[8:10] S 8:10 8 10 tag = 20190430 tag 20190430 if int(date) <= 20190430:
    print("Heisei")
else:
    print("TBD") int(date) <= 20190430 int(date) int date 20190430 print("Heisei") print "Heisei" print("TBD") print "TBD" S = input() input() S date = S[0:4]+S[5:7]+S[8:10] S[0:4]+S[5:7]+S[8:10] date tag = 20190430 20190430 tag
#! python3
#  solve_119_A.py

S = input()
date = S[0:4]+S[5:7]+S[8:10] #yyyymmdd式に変更

tag = 20190430

if int(date) <= 20190430:
    print("Heisei")
else:
    print("TBD")