import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    const N = readln.chomp.to!int;
    struct Info { long x, y, h; }

    Info[] infoList;
    foreach (i; 0..N) {
        const tmp = readln.split.to!(long[]);
        const x = tmp[0], y = tmp[1], h = tmp[2];
        if (h > 0) infoList ~= Info(x,y,h);
    }

    const info0 = infoList[0];
    const c = cartesianProduct(iota(101), iota(101))
        .find!(c =>
                infoList.all!(info =>
                    info0.h - (abs(c[0] - info.x) + abs(c[1] - info.y)) + (abs(c[0] - info0.x) + abs(c[1] - info0.y)) == info.h)).front;

    const CX = c[0], CY = c[1];

    const H = info0.h + abs(info0.x - CX) + abs(info0.y - CY);
    writefln("%d %d %d", CX, CY, H);
}
