s = list(input().split('/'))
s = [int(ss) for ss in s]

if s[0] < 2019:
  print("Heisei")
elif s[0] == 2019:
  if s[1] < 4 or (s[1] == 4 and s[2] <= 30):
    print("Heisei")
  else:
    print("TBD")
else:
  print("TBD") s = list(input().split('/')) s list(input().split('/')) list input().split('/') ().split () input split '/' int(ss) for ss in s for ss in s ss s for ss in s int(ss) int ss s = [int(ss) for ss in s] s [int(ss) for ss in s] if s[0] < 2019:
  print("Heisei")
elif s[0] == 2019:
  if s[1] < 4 or (s[1] == 4 and s[2] <= 30):
    print("Heisei")
  else:
    print("TBD")
else:
  print("TBD") s[0] < 2019 s[0] s 0 2019 print("Heisei") print "Heisei" elif s[0] == 2019:
  if s[1] < 4 or (s[1] == 4 and s[2] <= 30):
    print("Heisei")
  else:
    print("TBD") s[0] == 2019 s[0] s 0 2019 if s[1] < 4 or (s[1] == 4 and s[2] <= 30):
    print("Heisei")
  else:
    print("TBD") s[1] < 4 or (s[1] == 4 and s[2] <= 30) s[1] < 4 s[1] s 1 4 s[1] == 4 and s[2] <= 30 s[1] == 4 s[1] s 1 4 s[2] <= 30 s[2] s 2 30 print("Heisei") print "Heisei" print("TBD") print "TBD" print("TBD") print "TBD" s = list(input().split('/')) list(input().split('/')) s s = [int(ss) for ss in s] [int(ss) for ss in s] s
s = list(input().split('/'))
s = [int(ss) for ss in s]

if s[0] < 2019:
  print("Heisei")
elif s[0] == 2019:
  if s[1] < 4 or (s[1] == 4 and s[2] <= 30):
    print("Heisei")
  else:
    print("TBD")
else:
  print("TBD")
