n,t = gets.split(" ")
n = n.to_i
t = t.to_i

min_cost = 100000
while path = gets do
    cost,time = path.split(" ")
    cost = cost.to_i
    time = time.to_i
    if t >= time
        min_cost = cost if min_cost > cost
    end
end

if min_cost == 1000
    puts "TLE".chomp
else
    puts min_cost
end
