import Control.Monad (replicateM)

main :: IO ()
main = do
    (n,t) <- readIntPair
    cts <- readIntPairs n
    putStrLn $ solve t cts

readIntPair :: IO (Int, Int)
readIntPair = pair . map read . words <$> getLine
  where
    pair [x,y] = (x,y)

readIntPairs :: Int -> IO [(Int, Int)]
readIntPairs n = replicateM n readIntPair

solve :: Int -> [(Int, Int)] -> String
solve t = maybe "TLE" show . minimumCost t

minimumCost :: Int -> [(Int, Int)] -> Maybe Int
minimumCost t cts
  | null costs = Nothing
  | otherwise  = Just $ minimum costs
  where
    costs = [ci | (ci,ti) <- cts, ti <= t]
