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

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

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