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

ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Clue = Tuple!(long, "x", long, "y", long, "h");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

void main()
{
    auto n = lread();
    auto c = new Clue[](n);
    foreach (i; iota(n))
    {
        long x, y, h;
        scan(x, y, h);
        c[i] = Clue(x, y, h);
    }
    foreach (i; 0 .. 101)
    {
        outer: foreach (j; 0 .. 101)
        {
            long h;
            bool flag = true;
            foreach (e; c)
            {
                if (e.h > 0)
                {
                    auto tmp_h = e.h + abs(e.x - i) + abs(e.y - j);
                    if (h)
                        flag &= (tmp_h == h);
                    else
                        h = tmp_h;
                }
                if (!flag)
                    break;
            }
            if (flag)
            {
                // 本当に合ってる?
                foreach (e; c)
                {
                    if (max(h - abs(e.x - i) - abs(e.y - j), 0) != e.h)
                        continue outer;
                }
                writefln("%s %s %s", i, j, h);
                return;
            }
        }
    }
    assert(0);
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
