N, T, *rest = $stdin.read.split
cts = rest.each_slice(2).to_a
ret = 1000
ts = []
cts.each do |ct|
  ts << ct[1]
  if ct[1] <= T
    ret = [ct[0],ret].min
  end
end

if ts.min > T
  puts 'TLE'
else
  puts ret
end