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;
import std.random;
import std.typecons;
import std.container;

alias sread = () => readln.chomp();
ulong MOD = 1_000_000_007;
ulong INF = 1_000_000_000_000;
alias SugarWater = Tuple!(long, "swater", long, "sugar");

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

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

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

void main()
{
    auto n = lread();
    auto info = new long[][](n, 3);
    foreach (ref e; info)
        e = aryread();
    foreach (x; iota(101))
    {
        foreach (y; iota(101))
        {
            bool check;
            long h = info[0][2] > 0 ? abs(x - info[0][0]) + abs(y - info[0][1]) + info[0][2] : INF;
            foreach (i; iota(1, n))
            {
                auto tmp_h = info[i][2] > 0 ? abs(x - info[i][0]) + abs(
                        y - info[i][1]) + info[i][2] : INF;
                if (h == INF && tmp_h != INF)
                    h = tmp_h;
                else if (h == INF && tmp_h == INF)
                    continue;

                if(tmp_h != INF && tmp_h != h)
                {
                    check = !check;
                    break;
                }
            }
            if (!check)
            {
                writefln("%s %s %s", x, y, h);
                return;
            }
        }
    }
}