

class LazySegmentTree2
  def initialize(n,v=nil)
    @size=n
    @realsize=1
    while @realsize<@size do
      @realsize*=2
    end
    # default
    @tree_default=Float::INFINITY
    @change_default=nil
    @tree=Array.new(2*@realsize,@tree_default)
    # @tree[k] is applied by @change[k]
    @change=Array.new(2*@realsize,@change_default)
    build(v) if v
  end

  def build(v)
    @tree[@realsize,v.size]=v
    (@realsize-1).downto(1) do |parent|
      @tree[parent]=merge(@tree[2*parent],@tree[2*parent+1],@change[parent])
    end
  end

  def debug_print
    i=1
    while i<@realsize*2
      puts @tree[i,i].join(", ")
      i*=2
    end
    i=1
    while i<@realsize*2
      puts @change[i,i].map{|x| x.inspect}.join(", ")
      i*=2
    end
  end

  def merge(a,b,c)
    return c!=@change_default ? c : (a<b ? a : b)
  end

  def change_range(a,b,x)
    _change_range(a,b,1,0,@realsize,x,@change_default)
  end
  def _change_range(a,b,k,l,r,x,propergate_x)
    if r<=a || b<=l
      @change[k]=propergate_x if propergate_x!=@change_default
      @tree[k]=merge(@tree[k],@tree_default,@change[k])
      return
    end
    if a<=l && r<=b
      @change[k]=x
      @tree[k]=merge(@tree[k],@tree_default,@change[k])
      return
    end
    propergate_x=@change[k] if propergate_x==@change_default
    _change_range(a,b,2*k,l,(l+r)/2,x,propergate_x)
    _change_range(a,b,2*k+1,(l+r)/2,r,x,propergate_x)
    @change[k]=@change_default
    @tree[k]=merge(@tree[2*k],@tree[2*k+1],@change[k])
  end

  def get_min(a,b)
    return _get_min(a,b,1,0,@realsize)
  end

  def _get_min(a,b,k,l,r) # [a,b)
    return @tree_default if r<=a || b<=l
    return @tree[k] if a<=l && r<=b
    vl=_get_min(a,b,2*k,l,(l+r)/2)
    vr=_get_min(a,b,2*k+1,(l+r)/2,r)
    return merge(vl,vr,@change[k])
  end
end

# return leftest index where array[index]>=value
def _lower_bound(array,value,l,r)
    return l if r==l
    ind=(r+l)/2
    return value<=array[ind] ? _lower_bound(array,value,l,ind) : _lower_bound(array,value,ind+1,r)
end
def lower_bound(array,value)
    return value>array[-1] ? array.length : _lower_bound(array,value,0,array.length-1)
end



lst=LazySegmentTree2.new(2**19)
N,Q=gets.split.map(&:to_i)
point_compress={}
points=[]
events=[]
N.times do
    s,t,x=gets.split.map(&:to_i)
    points << s-x
    points << t-x
    events << [s,t,x]
end
points.sort!
points.each_with_index do |a,i|
    point_compress[a]=i
end
events.sort_by!{|s,t,x| x}
N.times do
    s,t,x=events.pop
    lst.change_range(point_compress[s-x],point_compress[t-x],x)
end
Q.times do
    x=gets.to_i
    point=points[lower_bound(points,x)]
    point=points[-2] if point==points[-1] && x!=points[-1]
    if point==nil || x<points[0]
        puts -1
    else
        temp=lst.get_min(point_compress[point],point_compress[point]+1)
        if temp==Float::INFINITY
            puts -1
        else
            puts temp
        end
    end
end