f t c k=if null c then if k==0 then"TLE"else show t else if t>=(head.last)c then f((head.head)c)(tail c)1 else f t(tail c)k
main=do
 [n,t]<-map read.words<$>getLine ::IO[Int]
 c<-map (map read.words).lines<$>getContents
 putStrLn$f t c 0