# util functions

# debug
$debugFlag = ( ARGV[0] != nil )
p "==== DEBUG MODE ====" if $debugFlag

def pd(str)
  p str if $debugFlag
end

def printd(str)
  print str if $debugFlag
end

# input
arr = []
lc = 0
while l = $stdin.gets do
  if lc == 0
    lmt = l.chomp.split(" ").map(&:to_i)[1]
  else
    tmp = l.chomp.split(" ").map(&:to_i)
    arr << tmp if tmp[1] <= lmt
  end
  lc += 1
end

arr.sort_by! {|a| a[0] }

# body
if $debugFlag
  p lmt
  p arr
end

if arr != []
  puts arr[0][0]
else
  puts "TLE"
end
