import           Control.Monad

inf :: Int
inf = 100000

main :: IO ()
main = do
    [n, t] <- fmap (map read . words) getLine :: IO [Int]
    cts    <- replicateM n $ fmap (map read . words) getLine :: IO [[Int]]
    solve t cts

solve :: Int -> [[Int]] -> IO ()
solve t cts =
    let cs = map (\v -> if last v <= t then head v else inf) cts
        c  = minimum cs
    in  if c == inf then putStrLn "TLE" else print c
