Y,M,D=map(int,input().split("/"))
if((Y<=2019 and M <= 4 and D <= 30) or Y<= 2018):
  print("Heisei")
else:
  print("TBD") Y,M,D=map(int,input().split("/")) Y map(int,input().split("/")) map int input().split("/") ().split () input split "/" M D if((Y<=2019 and M <= 4 and D <= 30) or Y<= 2018):
  print("Heisei")
else:
  print("TBD") (Y<=2019 and M <= 4 and D <= 30) or Y<= 2018 Y<=2019 and M <= 4 and D <= 30 Y<=2019 and M <= 4 Y<=2019 Y 2019 M <= 4 M 4 D <= 30 D 30 Y<= 2018 Y 2018 print("Heisei") print "Heisei" print("TBD") print "TBD" M,D=map(int,input().split("/")) map(int,input().split("/")) M D=map(int,input().split("/")) map(int,input().split("/")) D Y,M,D=map(int,input().split("/")) map(int,input().split("/")) Y
Y,M,D=map(int,input().split("/"))
if((Y<=2019 and M <= 4 and D <= 30) or Y<= 2018):
  print("Heisei")
else:
  print("TBD")