import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, core.bitop;

enum inf3 = 1_001_001_001;
enum inf6 = 1_001_001_001_001_001_001L;
enum mod = 1_000_000_007L;


void main() {
    int n;
    scan(n);

    auto x = new int[](n);
    auto y = new int[](n);
    auto h = new int[](n);

    int hm;

    foreach (i ; 0 .. n) {
        scan(x[i], y[i], h[i]);
        hm = max(hm, h[i]);
    }

    int calcH(int cx, int cy, int x, int y, int h) {
        return max(h - abs(x - cx) - abs(y - cy), 0);
    }

    foreach (cx ; 0 .. 100 + 1) {
        foreach (cy ; 0 .. 100 + 1) {
            foreach (hh ; hm .. hm + 201) {
                bool ok = true;
                foreach (i ; 0 .. n) {
                    if (calcH(cx, cy, x[i], y[i], hh) != h[i]) {
                        ok = false;
                        break;
                    }
                }
                if (ok) {
                    writeln(cx, " ", cy, " ", hh);
                    return;
                }
            }
        }
    }
}









void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}

void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
