import Control.Monad
import Data.List

main :: IO ()
main = do
  [n, t] <- map read . words <$> getLine
  let toTuple [c, t] = (c, t)
  cs <- replicateM n $ toTuple <$> map read . words <$> getLine
  let result = sortOn fst $ filter ((<= t) . snd) cs
  putStrLn $ if length result == 0 then "TLE" else show . fst $ head result