module Main (main) where
import System.IO
import Control.Monad

parseInput input = map read $ words input :: [Int]

main :: IO ()
main = do
    input <- getLine
    let [n, t] = parseInput input
    line <- sequence $ replicate n $ (\[cost, time] -> (read cost, read time)) . words <$> getLine :: IO [(Int, Int)]
    let res = solve line t    
    if minimum res == 10000
        then putStrLn "TLE"
    else putStrLn(show (minimum res))

solve :: [(Int, Int)] -> Int -> [Int]
solve [] t = []
solve ((cost, time) : xs) t
    | time <= t = [cost] ++ solve xs t
    | otherwise = [10000] ++ solve xs t
