s = input()
if int(s.replace("/", "")) <= 20190430:
  print("Heisei")
else:
  print("TBD") s = input() s input() input if int(s.replace("/", "")) <= 20190430:
  print("Heisei")
else:
  print("TBD") int(s.replace("/", "")) <= 20190430 int(s.replace("/", "")) int s.replace("/", "") s.replace s replace "/" "" 20190430 print("Heisei") print "Heisei" print("TBD") print "TBD" s = input() input() s
s = input()
if int(s.replace("/", "")) <= 20190430:
  print("Heisei")
else:
  print("TBD")