{-# LANGUAGE ScopedTypeVariables #-}
import Control.Applicative
import Control.Monad
import Data.List

small :: Int -> Int -> [Int] -> Int
small lc lt [] = lc
small lc lt (c:t:cts)
    | lc > c, lt > t = small c lt cts
    | otherwise = small lc lt cts

judge :: Int -> Int -> [Int] -> String
judge lc lt cts
    | small lc lt cts == 1001 = "TLE"
    | otherwise = show (small lc lt cts)

main = do
    [n,lt] <- fmap (read :: String -> Int) . words <$> getLine
    cts <- replicateM n readLn
    let lc = 1001
    let ans = judge lc lt cts
    putStrLn ans

