S = input()
y,m,d = S.split("/")
y,m,d = int(y),int(m),int(d)

if y == 2019:
  if m <= 4:
    if d <= 30:
      ans = "Heisei"
    else:
      ans = "TBD"
  else:
    ans = "TBD"
elif y < 2019:
  ans = "Heisei"
else:
  ans = "TBD"
  
print(ans) S = input() S input() input y,m,d = S.split("/") y S.split("/") S.split S split "/" m d y,m,d = int(y),int(m),int(d) y int(y) int y m int(m) int m d int(d) int d if y == 2019:
  if m <= 4:
    if d <= 30:
      ans = "Heisei"
    else:
      ans = "TBD"
  else:
    ans = "TBD"
elif y < 2019:
  ans = "Heisei"
else:
  ans = "TBD"
   y == 2019 y 2019 if m <= 4:
    if d <= 30:
      ans = "Heisei"
    else:
      ans = "TBD"
  else:
    ans = "TBD" m <= 4 m 4 if d <= 30:
      ans = "Heisei"
    else:
      ans = "TBD"
   d <= 30 d 30 ans = "Heisei" ans "Heisei" ans = "TBD" ans "TBD" ans = "TBD" ans "TBD" elif y < 2019:
  ans = "Heisei" y < 2019 y 2019 ans = "Heisei" ans "Heisei" ans = "TBD" ans "TBD" print(ans) print ans m,d = int(y),int(m),int(d) int(m) m m,d = S.split("/") S.split("/") m ans = "TBD" "TBD" ans d = S.split("/") S.split("/") d ans = "TBD" "TBD" ans S = input() input() S y,m,d = S.split("/") S.split("/") y y,m,d = int(y),int(m),int(d) int(y) y d = int(y),int(m),int(d) int(d) d ans = "Heisei" "Heisei" ans ans = "TBD" "TBD" ans ans = "Heisei" "Heisei" ans
S = input()
y,m,d = S.split("/")
y,m,d = int(y),int(m),int(d)

if y == 2019:
  if m <= 4:
    if d <= 30:
      ans = "Heisei"
    else:
      ans = "TBD"
  else:
    ans = "TBD"
elif y < 2019:
  ans = "Heisei"
else:
  ans = "TBD"
  
print(ans)