S0,S1,S2=input().split("/")
if int(S1)<5:
  print("Heisei")
else:
  print("TBD") S0,S1,S2=input().split("/") S0 input().split("/") ().split () input split "/" S1 S2 if int(S1)<5:
  print("Heisei")
else:
  print("TBD") int(S1)<5 int(S1) int S1 5 print("Heisei") print "Heisei" print("TBD") print "TBD" S2=input().split("/") input().split("/") S2 S1,S2=input().split("/") input().split("/") S1 S0,S1,S2=input().split("/") input().split("/") S0
S0,S1,S2=input().split("/")
if int(S1)<5:
  print("Heisei")
else:
  print("TBD")
