line = gets
line.chomp!

/(\d+)\/(\d+)\/(\d+)/ =~ line
y = $1.to_i             
m = $2.to_i
d = $3.to_i

if (y < 2019) then
  print "Heisei"
elsif (y == 2019) then
  if (m < 4) then
    print "Heisei"
  elsif (m == 4) then
    if (d <= 30) then
      print "Heisei"
    else
      print "TBD"
    end
  else
    print "TBD"
  end
else
  print "TBD"
end
