import Data.List
import Debug.Trace

main :: IO ()
main = do
   s <- getLine
   let y = read $ take 4 s :: Int
       m = read $ take 2 $ drop 5 s :: Int
       d = read $ take 2 $ drop 8 s :: Int
   case (y,m,d) of
    (2019,4,z) | z <= 30 -> putStrLn "Heisei"
               | otherwise -> putStrLn "TBD"
    (2019,y,_) | y <= 4 -> putStrLn "Heisei"
               | otherwise -> putStrLn "TBD"
    (x,_,_)    | x <= 2019 -> putStrLn "Heisei"
               | otherwise -> putStrLn "TBD"
