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;
    foreach (i; 0 .. N)
    {
        xyh ~= aryread;
    }

    xyh.sort!((a, b) => a[2] < b[2]);

    foreach (cx; 0 .. 101)
        foreach (cy; 0 .. 101)
        {
            bool flag = true;
            long ch = xyh[$ - 1][2] + abs(xyh[$ - 1][0] - cx) + abs(xyh[$ - 1][1] - cy);
            foreach (i; 0 .. N - 1)
            {
                long d = abs(xyh[i][0] - cx) + abs(xyh[i][1] - cy);
                if (d <= ch)
                {
                    long h = xyh[i][2] + d;
                    flag = flag && (ch == h);
                }
            }
            if (flag)
            {
                writefln("%d %d %d", cx, cy, ch);
                return;
            }
        }

    // xyh.writeln;
    // long X, Y;
    // long H = 0;
    // writefln("%d %d %d", X, Y, H);
}
