S=input()
month=int(S[5:7])
day=int(S[8:10])
if (month==4 and day<=30) or month<4 :
  print("Heisei")
else :
  print("TBD") S=input() S input() input month=int(S[5:7]) month int(S[5:7]) int S[5:7] S 5:7 5 7 day=int(S[8:10]) day int(S[8:10]) int S[8:10] S 8:10 8 10 if (month==4 and day<=30) or month<4 :
  print("Heisei")
else :
  print("TBD") (month==4 and day<=30) or month<4 month==4 and day<=30 month==4 month 4 day<=30 day 30 month<4 month 4 print("Heisei") print "Heisei" print("TBD") print "TBD" S=input() input() S day=int(S[8:10]) int(S[8:10]) day month=int(S[5:7]) int(S[5:7]) month
S=input()
month=int(S[5:7])
day=int(S[8:10])
if (month==4 and day<=30) or month<4 :
  print("Heisei")
else :
  print("TBD")