main = do
  [_, t'] <- map (read :: String -> Int).words <$> getLine
  cts <- map (map read.words).lines <$> getContents
  let limited = filter (\ct -> last ct <= t') cts
  if limited == [] then putStrLn "TLE"
  else print $ minimum (map (\(c:_) -> c) limited)