### BUGGY CODE ###

# インデックス付き
class AVLtree:
    """
    参考：http://www.nct9.ne.jp/m_hiroi/light/pyalgo12.html
    insert : 挿入
    erase : 削除
    lower_bound(x) : x <= v なる最小のv、なければ-float("inf")、最小値はlower(-float("inf"))
    upper_bound(x) : v < x なる最大のv、なければfloat("inf")、最大値はupper(float("inf"))
    avltree[i] : i番目の値取得 (-1で最大値)
    print(avltree) : デバッグ用
    """
 
    def __init__(self):
        self.root = None
        self.num = 0
        
    def insert(self, x):
        if self.root is None:
            self.root = Node(x)
            self.num += 1
            return
        q = []
        node = self.root
        while True:
            if node.val == x:
                return
            elif x < node.val:
                q.append((node, 1))
                if node.left is None:
                    node.left = Node(x)
                    break
                node = node.left
            else:
                q.append((node, -1))
                if node.right is None:
                    node.right = Node(x)
                    break
                node = node.right
        self.num += 1
        
        # バランス調整
        new_node = None
        while q:
            node, key = q.pop()
            node.bal += key
            node.size += 1
            bal = node.bal
            if not bal:
                while q:
                    node, key = q.pop()
                    node.size += 1
                return
            if bal == 2:
                if node.left.bal == -1:
                    node.left = node.left._rotateL()
                    new_node = node._rotateR()
                    new_node._update_bal()
                else:
                    new_node = node._rotateR()
                    new_node.bal = 0
                    node.bal = 0
                break
            elif bal == -2:
                if node.right.bal == 1:
                    node.right = node.right._rotateR()
                    new_node = node._rotateL()
                    new_node._update_bal()
                else:
                    new_node = node._rotateL()
                    new_node.bal = 0
                    node.bal = 0
                break
        if q:
            node, key = q.pop()
            node.size += 1
            if key == 1:
                node.left = new_node
            else:
                node.right = new_node
        elif new_node is not None:
            self.root = new_node
        while q:
            node, key = q.pop()
            node.size += 1

            
    def erase(self, x):
        if self.root is None:
            return
        q = []
        node = self.root
        while node is not None:
            if node.val == x:
                break
            if x < node.val:
                q.append((node, 1))
                node = node.left
            else:
                q.append((node, -1))
                node = node.right
        else:
            return

        self.num -= 1
        if node.left is not None and node.right is not None:
            q.append((node, -1))
            min_node = node.right
            while min_node.left is not None:
                q.append((min_node, 1))
                min_node = min_node.left
            node.val = min_node.val
            node = min_node
        if q:
            pre, key = q[-1]
        else:
            pre = None
        if node.left is None:
            cnode = node.right
        else:
            cnode = node.left
        if pre is None:
            self.root = cnode
            return
        if key == 1:
            pre.left = cnode
        else:
            pre.right = cnode
        
        # バランス調整
        while q:
            new_node = None
            node, key = q.pop()
            node.bal -= key
            node.size -= 1
            bal = node.bal
            if bal == 2:
                if node.left.bal == -1:
                    node.left = node.left._rotateL()
                    new_node = node._rotateR()
                    new_node._update_bal()
                else:
                    new_node = node._rotateR()
                    if not new_node.bal:
                        new_node.bal = -1
                        node.bal = 1
                    else:
                        new_node.bal = 0
                        node.bal = 0
            elif bal == -2:
                if node.right.bal == 1:
                    node.right = node.right._rotateR()
                    new_node = node._rotateL()
                    new_node._update_bal()
                else:
                    new_node = node._rotateL()
                    if not new_node.bal:
                        new_node.bal = 1
                        node.bal = -1
                    else:
                        new_node.bal= 0
                        node.bal = 0
            elif bal:
                break
            if new_node is not None:
                if not q:
                    self.root = new_node
                    return
                node, key = q[-1]
                if key == 1:
                    node.left = new_node
                else:
                    node.right = new_node
                if new_node.bal:
                    break
        while q:
            node, key = q.pop()
            node.size -= 1
                    
    def lower_bound(self, x):
        res = float("inf")
        node = self.root
        while node is not None:
            if x <= node.val:
                res = node.val
                node = node.left
            else:
                node = node.right
        return res
    
    
    def upper_bound(self, x):
        res = -float("inf")
        node = self.root
        while node is not None:
            if x <= node.val:
                node = node.left
            else:
                res = node.val
                node = node.right
        return res
    
    def __len__(self):
        return self.num

    def __getitem__(self, key):
        if key < 0:
            key += self.num
        key += 1
        node = self.root
        while True:
            idx = node.left.size + 1 if node.left is not None else 1
            if idx <= key:
                key -= idx
                if not key:
                    break
                node = node.right
            else:
                node = node.left
        return node.val

    
    def __str__(self):
        if self.root is None:
            return "[]"
        buff = "["
        for x in self.root._dfs():
            buff += str(x)+", "
        buff = buff.rstrip(", ")
        buff += "]"
        return buff


class Node:
    def __init__(self, x):
        self.val = x
        self.left = None
        self.right = None
        self.bal = 0 #1:左1, -1:右1
        self.size = 1
    
    def _rotateR(self):
        nodeL = self.left
        nodeLL_size = nodeL.left.size if nodeL.left is not None else 0
        nodeR_size = self.right.size if self.right is not None else 0
        self.size -= nodeLL_size + 1
        nodeL.size += nodeR_size + 1
        self.left = nodeL.right
        nodeL.right = self
        return nodeL
    
    
    def _rotateL(self):
        nodeR = self.right
        nodeRR_size = nodeR.right.size if nodeR.right is not None else 0
        nodeL_size = self.left.size if self.left is not None else 0
        self.size -= nodeRR_size + 1
        nodeR.size += nodeL_size + 1
        self.right = nodeR.left
        nodeR.left = self
        return nodeR
    
    
    def _update_bal(self):
        if self.bal == 1:
            self.right.bal = -1
            self.left.bal = 0
        elif self.bal == -1:
            self.right.bal = 0
            self.left.bal = 1
        else:
            self.right.bal = 0
            self.left.bal = 0
        self.bal = 0
    
    
    def _dfs(self):
        if self is not None:
            if self.left is not None:
                for x in self.left._dfs():
                    yield x
            yield self.val
            if self.right is not None:
                for x in self.right._dfs():
                    yield x
                    

n,q = map(int, input().split())
e = []
for i in range(n):
  s,t,x = map(int, input().split())
  e.append((s-x,x,i))
  e.append((t-x,x,i))
e.sort(key=lambda x:x[0])
D = [int(input()) for _ in range(q)]
avl = AVLtree()
ans = []
f = [0]*n
j = 0
N = 2*n
for d in D:
  while j < N and e[j][0] <= d:
    _,x,i = e[j]
    if f[i]:
      avl.erase((x,i))
    else:
      avl.insert((x,i))
      f[i] = 1
    j += 1
  m = avl.lower_bound((-float("inf"),0))
  ans.append(m[0] if m != float("inf") else -1)

for i in ans:
  print(i)


### FIXED CODE ###

#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    a,p = LI()
    print((a*3+p)//2)
    return

#B
def B():
    n = I()
    s = [None for i in range(n)]
    for i in range(n):
        l = input().split()
        s[i] = l+[i]
    s.sort(key = lambda x:(x[0],-int(x[1])))
    for i,a,b in s:
        print(b+1)
    return

#C
def C():
    def dfs(d,k):
        if d == n:
            l.append(k)
        else:
            dfs(d+1,k+[0])
            dfs(d+1,k+[1])
    n,m = LI()
    l = []
    dfs(0,[])
    qu = LIR(m)
    p = LI()
    ans = 0
    for k in l:
        s = 0
        for q in range(m):
            num = qu[q][0]
            lis = list(map(lambda x:x-1, qu[q][1:]))
            su = 0
            for i in lis:
                su ^= k[i]
            if su == p[q]:
                s += 1
        if s == m:
            ans += 1
    print(ans)
    return

#D
def D():
    n,k = LI()
    v = LI()
    ans = -float("inf")
    for l in range(min(k,n)+1):
        for r in range(min(k,n)-l+1):
            m = 0
            q = v[:l]+v[n-r:]
            q.sort()
            res = max(0,k-r-l)
            for i in range(len(q)):
                if q[i] < 0 and res > 0:
                    res -= 1
                else:
                    m += q[i]
            if m > ans:
                ans = m
    print(ans)
    return

#E
def E():
    n,Q = LI()
    e = []
    for i in range(n):
        s,t,x = LI()
        e.append((s-x,x,1))
        e.append((t-x-0.1,x,0))
    e.sort(key = lambda x : x[0])
    m = 2*n
    q = set()
    j = 0
    ans = float("inf")
    for i in range(Q):
        d = I()
        while j < m:
            t,x,k = e[j]
            if d < t:
                break
            if k:
                q.add(x)
                if x < ans:
                    ans = x
            else:
                q.remove(x)
                if ans == x:
                    if q:
                        ans = min(q)
                    else:
                        ans = float("inf")
            j += 1
        print(-1 if ans == float("inf") else ans)
    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    E()