import Control.Monad
import Data.List

main::IO()
main=do
  (n:t:[])<-(return.(map read).words)=<<getLine
  dat<-forM [1..n] (\_->(return.(\(x:y:_)->(x,y)).(map read).words)=<<getLine)
  putStr (solver dat t)

solver::[(Int,Int)]->Int->String
solver d t = case ((sortBy (\ (c1,_) -> \ (c2,_) -> compare c1 c2)).(filter (\(_,t_)->t_<=t))) d of
              []         -> "TLE\n"
              (cost,_):_ -> (show cost)++"\n"