n = gets.split.map(&:to_i)
a = []
n[0].times do |i|
	a[i] = gets.split.map(&:to_i)
end
a << [100000, 1000000]

a.sort!

i = 0

while a[i][1] > n[1]
	i += 1
	if i == n[0]
		puts "TLE"
		exit
	end
end
puts a[i][0]



