class Job
   attr_accessor :cost, :time
end
jobs = []

n, t = gets.split(" ").map(&:to_i)
n.times do
  job = Jobs.new
  m = gets.chomp.split(" ")
  job.cost = m[0].to_s
  job.time = m[1].to_i
  jobs.push(job)
end
jobs.sort! do |a, b|
  (a.cost <=> b.cost).nonzero? ||
    (b.time <=> a.time)
end

for i in 0..n-1 do
  if job[i].time <= t
    puts job[i].cost
    exit
  end
end
puts "TLE"
