import Control.Monad
main = do
    (n:t:_)<-map read.words<$>getLine::IO [Int]
    ans<-map head.filter (\(_:u:_)->u<=t) <$> replicateM n (map read.words<$>getLine)::IO[Int]
    case ans of
        [] -> putStrLn "TLE"
        _ -> print $ minimum ans
