import Control.Arrow
import Data.List
import qualified Data.ByteString.Char8 as B
import Control.Monad 

main :: IO ()
main = breads >>= main'
    where
        main' [n, t] = replicateM n breads >>= putStrLn . solve t

solve :: Int -> [[Int]] -> String
solve t = judge . map head . filter (\v -> last v <= t)
    where
        judge [] = "TLE"
        judge xs = show $ minimum xs

breads :: IO [Int]
breads = unfoldr (\s -> second (maybe B.empty snd . B.uncons) <$> B.readInt s) <$> B.getLine