"use strict";
function I(t,i){this._s=t.split("\n"),this._c=0,this._l=0,this._f=i||Number}I.prototype.a=function(t){var i=this._s[this._l];if(i){var s=i.trim().split(" "),h=s[this._c];return this._c++,s.length===this._c&&(this._c=0,this._l++),t?t(h):this._f(h)}},I.prototype.l=function(t){var i=this._s[this._l];if(i)return this._c=0,this._l++,i.split(" ").map(t||this._f)},module.exports=I;

function main(input) {
  var o = new I(input);

  var n = o.a();
  var q = o.a();

  var s = [], t = [], x = [];
  for ( var i = 0; i < n; i++ ) {
    s.push(o.a());
    t.push(o.a());
    x.push(o.a());
  }

  var d = [];
  for ( var i = 0; i < q; i++ ) {
    d.push(o.a());
  }

  var arr = [];
  arr.push({s: -Infinity, t: -Infinity, x: Infinity});

  var temp = [];
  for (var i = 0; i < n; i++) {
    temp.push(s[i] - x[i]);
    temp.push(t[i] - x[i]);
  }

  temp.sort((a, b) => a - b);
  for (var i = 0; i < temp.length - 1; i++) {
    if (temp[i] !== temp[i+1]) {
      arr.push({s: temp[i], t: temp[i + 1], x: Infinity});
    }
  }
  arr.push({s: Infinity, t: Infinity, x: Infinity});

  var temp = [];
  for ( var i = 0; i < n; i++ ) {
    temp.push({s: s[i] - x[i], t:t[i] - x[i], x:x[i]});
  }
  temp.sort((a, b) => a.x - b.x);

  for (var i = 0; i < temp.length; i++) {
    var low = 0, high = arr.length - 1;
    while (low < high - 1) {
      var mid = Math.floor((low + high) / 2);
      if (temp[i].s < arr[mid].s) {
        high = mid;
      } else {
        low = mid;
      }
    }
    var cur = low;
    // console.log({cur, arr, temp:temp[i]})
    while (arr[cur].t <= temp[i].t) {
      if (arr[cur].x > temp[i].x) arr[cur].x = temp[i].x;
      cur += 1;
    }
  }
  // console.log({arr});

  for (var i = 0; i < q; i++) {
    var low = 0, high = arr.length - 1;
    while (low < high - 1) {
      var mid = Math.floor((low + high) / 2);
      if (d[i] < arr[mid].s) {
        high = mid;
      } else {
        low = mid;
      }
    }

    // console.log({di: d[i], low})
    if (arr[low].t >= d[i]) {
      if (Number.isFinite(arr[low].x)) {
        console.log(arr[low].x);
      } else {
        console.log(-1);
      }
    } else {
      console.log(-1);
    }
  }
  // console.log({n, q, s, t, x, d})
}


main(require("fs").readFileSync("/dev/stdin", "utf8"));
