"use strict";
function Main(input) {
    let lines = input.split("\n");
    let cols = lines.shift().split(/\s/).map((v) => v - 0);
    let N = cols[0];
    let x = [], y = [], h = [];
    for (let n = 0; n < N; n++) {
        let cols = lines.shift().split(/\s/).map((v) => v - 0);
        x.push(cols[0]);
        y.push(cols[1]);
        h.push(cols[2]);
    }

    const MAX = 100;
    for (let posY = 0; posY <= MAX; posY++) {
        for (let posX = 0; posX <= MAX; posX++) {
            let needH = -1;
            for (let i = 0; i < N; i++) {
                if (h[i] > 0) {
                    let tmp = h[i] + Math.abs(posY - y[i]) + Math.abs(posX - x[i]);
                    if (needH == -1) {
                        needH = tmp;
                    } else {
                        if (needH != tmp) {
                            needH = -2;
                            break;
                        }
                    }
                }
            }
            if (needH == -2) continue;
            for (let i = 0; i < N; i++) {
                if (h[i] == 0) {
                    let dist = Math.abs(posY - y[i]) + Math.abs(posX - x[i]);
                    if (needH > dist) {
                        needH = -2;
                        break;
                    }
                }
            }
            if (needH == -2) continue;
            console.log(posX + " " + posY + " " + needH);
            return 0;
        }
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
