function input()
  local inp = io.read()
  local r1,r2
  for i=1,string.len(inp),1 do
    if inp:sub(i,i)==' ' then
      r1 = tonumber(inp:sub(1,i-1))
      r2 = tonumber(inp:sub(i+1,string.len(inp)))
    end
  end
  return r1,r2
end


local n,T
n,T = input()
c={}
t={}
for i=1,n,1 do
  c[i],t[i] = input()
end

local res = 100000
for i=1,n,1 do
  if t[i]<=T then
    res = math.min(res,c[i])
  end
end
if res==100000 then
  print("TLE")
else
  print(res)
end