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

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

  const N = o.a();

  let x = [];
  let y = [];
  let h = [];
  for (let i = 0; i < N; i++) {
    x.push(o.a());
    y.push(o.a());
    h.push(o.a());
  }

  let firstNotZero;
  for (let k = 0; k < N; k++) {
    if (h[k] !== 0) {
      firstNotZero = k;
      break;
    }
  }

  let flag;
  for (let i = 0; i<= 100; i ++) {
    for (let j = 0; j<= 100; j++) {
      flag = true;

      let base = Math.abs(i - x[firstNotZero]) + Math.abs(j - y[firstNotZero]);
      let H = h[firstNotZero] + base;


      for (let k = 1; k < N; k++) {
        let temp = Math.abs(i - x[k]) + Math.abs(j - y[k]);
        let result = H - temp > 0 ? H - temp : 0;
        if (result !== h[k]) {
          flag = false;
          break;
        }
      }

      if (flag) {
        console.log(i, j, H);
        break;
      }
    }

    if (flag) break;
  }

}


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