data = gets.split(" ")
limit = data[1].to_i
count = data[0].to_i

db=Array.new
count.times do |i|
    d = gets.split(" ")
    db.push(d)
end 

db = db.find_all {|item| item[1].to_i <= limit.to_i}
int = 10000
db.each do |d|
    i = d[0].to_i 
    if i < int 
        int = i 
    end 
end 
if int == 10000
    puts "TLE"
else 
    puts int 
end 