nu,ti = gets.chomp.split(" ").map(&:to_i)
ro = Array.new(nu).map{Array.new(2, 0)}
for i in 0..nu - 1
  ro[i] = gets.chomp.split(" ").map(&:to_i)
end
ans = ro.sort

for i in 0..nu - 1
  if ans[i][1] <= ti
    puts ans[i][0]
    exit
  end
end

puts "TLE"
