s = list(input().split("/"))
answer = "TBD"

if int(s[0]) <= 2019:
  if int(s[1]) <= 4:
    if int(s[2]) <= 30:
      answer = "Heisei"
      
print(answer) s = list(input().split("/")) s list(input().split("/")) list input().split("/") ().split () input split "/" answer = "TBD" answer "TBD" if int(s[0]) <= 2019:
  if int(s[1]) <= 4:
    if int(s[2]) <= 30:
      answer = "Heisei"
       int(s[0]) <= 2019 int(s[0]) int s[0] s 0 2019 if int(s[1]) <= 4:
    if int(s[2]) <= 30:
      answer = "Heisei"
       int(s[1]) <= 4 int(s[1]) int s[1] s 1 4 if int(s[2]) <= 30:
      answer = "Heisei"
       int(s[2]) <= 30 int(s[2]) int s[2] s 2 30 answer = "Heisei" answer "Heisei" print(answer) print answer answer = "Heisei" "Heisei" answer s = list(input().split("/")) list(input().split("/")) s answer = "TBD" "TBD" answer
s = list(input().split("/"))
answer = "TBD"

if int(s[0]) <= 2019:
  if int(s[1]) <= 4:
    if int(s[2]) <= 30:
      answer = "Heisei"
      
print(answer)