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];
        infoList ~= Info(x,y,h);
    }

    const maxHeight = infoList.map!(info => info.h).reduce!max;

    cartesianProduct(iota(101), iota(101), iota(maxHeight, maxHeight + 220))
        .filter!(c =>
                infoList.all!(info =>
                    info.h == max(0, c[2] - abs(c[0] - info.x) - abs(c[1] - info.y))))
        .each!(a => writefln("%d %d %d", a[0], a[1], a[2]));
}
