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 Loc = Tuple!(long, "x", long, "y", long, "h");

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

auto charcount(string s)
{
    char current = s[0];
    auto ret = new long[](1);
    foreach (e; s)
    {
        if (e != current)
        {
            ret ~= [0];
            current = e;
        }
        ret[$ - 1]++;
    }
    return ret;
}

void main()
{
    auto n = lread();
    auto l = new Loc[](n);
    foreach (i; iota(n))
    {
        long x, y, h;
        scan(x, y, h);
        l[i] = Loc(x, y, h);
    }
    // l.writeln();
    foreach (X; iota(101))
    {
        foreach (Y; iota(101))
        {
            long H;
            bool check = true;
            foreach (e; l)
            {
                auto dist = abs(X - e.x) + abs(Y - e.y);
                if (e.h != 0 && !H)
                {
                    H = dist + e.h;
                }
                else if (e.h != 0 && H != dist + e.h)
                {
                    check = false;
                    break;
                }
            }
            if (check)
                writefln("%s %s %s", X, Y, H);
            else
                continue;
        }
    }
}