'use strict';
const main = input => {
  const n = parseInt(input[0]);
  let x = new Array(n), y = new Array(n), h = new Array(n);
  for(let i=0; i<n; i++) {
    let s = input[i+1].split(' ');
    x[i] = parseInt(s[0]);
    y[i] = parseInt(s[1]);
    h[i] = parseInt(s[2]);
  }
  // console.log(n, x, y, h);
  for(let px=0; px<101; px++) {
    for(let py=0; py<101; py++) {
      let height = 1;
      for(let i=0; i<n; i++) {
        if (h[i]) height = h[i]+Math.abs(px-x[i])+Math.abs(py-y[i])
      }
      let tf = 1;
      for(let k=0; k<n; k++) {
        if (Math.max(height-Math.abs(px-x[k])-Math.abs(py-y[k]), 0) != h[k]) {
          tf = 0;
        }
      }
      if (tf==1) {
        console.log(px, py, height);
        return;
      }
    }
  }
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));