N=io.read("n")
T=io.read("n")
c={}
t={}
for i=1,N do 
  c[i]=io.read("n")
  t[i]=io.read("n")
end
s="TLE"
for i=1,N do 
  if t[i]<T then 
    s=math.max(table.unpack(c))
    break
  end
end
for i=1,N do 
  if t[i]<T and s>c[i] then
    s=c[i]
  end
end
print(s)