"use strict";

// read lines from stdin
const input = require("fs")
  .readFileSync("/dev/stdin", "utf8")
  .split("\n");

const N = parseInt(input[0], 10);

for (let x = 0; x <= 100; x++) {
  for (let y = 0; y <= 100; y++) {
    let found = true;
    let estimate = {
      x,
      y,
      h: 0,
    }
    for (let i = 1; i <= N; i++) {
      const line = input[i].split(" ").map((val) => parseInt(val), 10);
      const point = {
        x: line[0],
        y: line[1],
        h: line[2],
      };

      if (i === 1) {
        estimate.h = estimateTopHeight(point, { x, y });
        continue;
      }

      if (!isValidHeight(point, estimate)) {
        found = false;
        break;
      }
    }

    if (found) {
      console.log(`${estimate.x} ${estimate.y} ${estimate.h}`);
      return;
    }
  }
}

function estimateTopHeight(current, top) {
  return current.h + Math.abs(top.x - current.x) + Math.abs(top.y - current.y);
}

function isValidHeight(current, top) {
  return Math.max(top.h - Math.abs(top.x - current.x) - Math.abs(top.y - current.y), 0) === current.h;
}
