array=[]
ary=[]
STDIN.each_line {|line|
array.push(line.chomp)
}
array
array.each{|v|
ary.push(v.split(" "))
}
ary.each{|v| v.map!(&:to_i)}
nn = ary[0][0]
tt = ary[0][1]
ary.shift
ary.delete_if{|a|a[1] > tt}
if ary.empty?
  puts 'TLE'
else
  ary.sort!{|a,b|a[0]<=>b[0]}
  puts ary[0][0]
end
