let heisei s =
  let year = int_of_string (String.sub s 0 4) in
  let month = int_of_string (String.sub s 5 2) in
  if year < 2019 || (year = 2019 && month  <= 4) then "Heisei"
  else "TBD"
let () =
  Scanf.scanf "%s\n"
    (fun s -> heisei s) |> print_string