s=input()
month=int(s[5:7])
day=int(s[8:10])
if month>=5:
  print("TBD")
elif day==31:
  print("TBD")
else:
  print("Heisei") 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>=5:
  print("TBD")
elif day==31:
  print("TBD")
else:
  print("Heisei") month>=5 month 5 print("TBD") print "TBD" elif day==31:
  print("TBD") day==31 day 31 print("TBD") print "TBD" print("Heisei") print "Heisei" month=int(s[5:7]) int(s[5:7]) month day=int(s[8:10]) int(s[8:10]) day s=input() input() s
s=input()
month=int(s[5:7])
day=int(s[8:10])
if month>=5:
  print("TBD")
elif day==31:
  print("TBD")
else:
  print("Heisei")
