import Control.Monad
main = do
  [n,time] <- map read . words <$> getLine
  cts <- replicateM n (map read . words <$> getLine) :: IO [[Int]]
  let c = foldl (\cost (c:t:_) -> if (t<=time && c<cost) then c else cost) 1001 cts
  if c == 1001 then putStr "TLE" else print c