import core.bitop;
import std.algorithm;
import std.ascii;
import std.bigint;
import std.conv;
import std.functional;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;

T lread(T = long)()
{
    return readln.chomp.to!T();
}

T[] aryread(T = long)()
{
    return readln.split.to!(T[])();
}

alias sread = () => readln.chomp();

void main()
{
    long[101][101] m;
    foreach (ref r; m)
        r[] = long.max;

    long N = lread;

    long[][] xyh;
    long[] g;
    foreach (i; 0 .. N)
    {
        auto tmp = aryread;
        xyh ~= tmp;
        if (1 <= tmp[2])
        {
            g = tmp;
        }
    }

    long[][] results;

    foreach (cx; 0 .. 101)
        foreach (cy; 0 .. 101)
        {
            auto gh = abs(g[0] - cx) + abs(g[1] - cy) + g[2];
            bool flag = true;
            foreach (q; xyh)
            {
                auto qh = gh - abs(q[0] - cx) - abs(q[1] - cy);
                qh = max(qh, 0);
                if (qh != q[2])
                {
                    flag = false;
                }
            }
            if (flag)
            {
                results ~= [cx, cy, gh];
            }
        }

    if (results.length == 1)
    {
        auto r = results[0];
        writefln("%d %d %d", r[0], r[1], r[2]);
    }
    else
    {
        writeln(results);
        throw new Error("");
    }
    // writefln("%d %d %d", X, Y, H);
}
