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);

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

    int k = -1;
    foreach (i ; 0 .. n) {
        if (h[i] > 0) {
            k = i;
            break;
        }
    }

    foreach (cx ; 0 .. 101) {
        foreach (cy ; 0 .. 101) {
            int H = h[k] + abs(cx - x[k]) + abs(cy - y[k]);

            bool ok = true;

            foreach (i ; 0 .. n) {
                if (max(0, H - abs(cx - x[i]) - abs(cy - y[i])) != h[i]) {
                    ok = false;
                    break;
                }
            }

            if (ok) {
                writefln("%d %d %d", cx, cy, H);
                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);
        }
    }
}

bool chmin(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x > arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}

bool chmax(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x < arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}
