import std.stdio, std.algorithm, std.string, std.conv, std.array, std.range, std.math;
T Read(T)() { return readln.chomp.to!(T); }
T[] Reads(T)() { return readln.split.to!(T[]); }
alias read = Read!(int);
alias reads = Reads!(int);

struct Query {
    int x, y, h;
}

void main() {
    int n = read();
    auto qs = new Query[n];
    foreach (ref q ; qs)
        readf("%d %d %d\n", &q.x, &q.y, &q.h);

    foreach (cx; 0..101) foreach (cy; 0..101) {
        int H = qs[0].h + abs(qs[0].x - cx) + abs(qs[0].y - cy);
        if (H < 1) continue;
        if (qs[1..$].all!(q => q.h == max(0, H - abs(q.x - cx) - abs(q.y - cy)))) {
            writeln(cx, " ", cy, " ", H);
            return;
        }
    }
    assert(false);
}