s = input()
if s[5] == "1":
  print("TBD")
elif int(s[6]) >= 5:
  print("TBD")
else:
  print("Heisei") s = input() s input() input if s[5] == "1":
  print("TBD")
elif int(s[6]) >= 5:
  print("TBD")
else:
  print("Heisei") s[5] == "1" s[5] s 5 "1" print("TBD") print "TBD" elif int(s[6]) >= 5:
  print("TBD") int(s[6]) >= 5 int(s[6]) int s[6] s 6 5 print("TBD") print "TBD" print("Heisei") print "Heisei" s = input() input() s
s = input()
if s[5] == "1":
  print("TBD")
elif int(s[6]) >= 5:
  print("TBD")
else:
  print("Heisei")
