import Control.Applicative
import Control.Monad

main :: IO ()
main = do
  [n, tl] <- f
  solve tl <$> replicateM n f >>= putStrLn
  where
    f = map read <$> words <$> getLine
    

solve :: Int -> [[Int]] -> String
solve tl cts = let cts' = filter (\[_,t] -> t <= tl) cts
               in if null cts' then "TLE" else (show . (!! 0) . minimum) cts'
