import Control.Applicative
import Control.Monad
import Data.List
import Data.Maybe

tuple a b = (a, b)
apply2 f [a, b] = f a b

main = map read . words <$> getLine >>= \[n, t] -> map (apply2 tuple . map read . words) <$> replicateM n getLine >>= putStrLn . fromMaybe "TLE" . fmap show . listToMaybe . sort . map fst . filter ((<=t) . snd)