import           Control.Monad

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 head $ filter (\(_ : ti : _) -> ti <= t) cts
    in  if null cs then putStrLn "TLE" else print $ minimum cs
