n, q = gets.chomp.split(" ").map(&:to_i)
ev = []
n.times do |i|
  s, t, x = gets.chomp.split(" ").map(&:to_i)
  ev << [s - x, 1, x]
  ev << [t - x, -1, x]
end
ev = ev.sort_by {|t, e, x| t}
q.times do |i|
  d = gets.chomp.to_i
  c = Hash.new(0)
  ev.each do |t, e, x|
    break if d < t
    c[x] += e
  end
  min_x = c.select {|x,v| v > 0}.map{|x,v| x}.min
  puts (min_x || -1)
end
