// デバッグ実行：Ctrl+F5

using System;

class Program
{
    static void Main(string[] args)
    {
        String line;
        line = Console.ReadLine();
        String[] words = line.Split(' ');
        int N = int.Parse(line);
        int maxX = 100, maxY = 100, minX = 0, minY = 0;

        if (N == 1)
        {
            // そのまま出力？
            line = Console.ReadLine();
            words = line.Split(' ');
            Console.WriteLine(words[0] + " " + words[1] + " " + words[2]);
            return;
        }

        Tuple<int, int, int>[] dataset = new Tuple<int, int, int>[N];
        for(int i = 0; i < N; i++)
        {
            line = Console.ReadLine();
            words = line.Split(' ');
            dataset[i] = new Tuple<int, int, int>(int.Parse(words[0]), int.Parse(words[1]), int.Parse(words[2]));
        }
        bool stop = false;
        int result_x = 0;
        int result_y = 0;
        int H_kouho = -1;
        int result_h = 0;
        for (int x = 0; x < 101; x++)
        {
            for (int y = 0; y < 101; y++)
            {
                stop = false;
                H_kouho = -1;
                int H = 0;
                for (int i = 0; i < N; i++)
                {
                    if (dataset[i].Item3 != 0)
                    {
                        H = dataset[i].Item3 + Math.Abs(dataset[i].Item1 - x) + Math.Abs(dataset[i].Item2 - y);
                        if (H_kouho == -1)
                        {
                            H_kouho = H;
                        }
                        else if (H != H_kouho)
                        {
                            stop = true;
                            break;
                        }
                    }
                }

                for (int i = 0; i < N; i++)
                {
                    if (dataset[i].Item3 != 0)
                    {
                        result_h = dataset[i].Item3 + Math.Abs(dataset[i].Item1 - x) + Math.Abs(dataset[i].Item2 - y);
                        break;
                    }
                }
                for (int i = 0; i < N; i++)
                {
                    if (dataset[i].Item3 == 0 && result_h > Math.Abs(dataset[i].Item1 - x) + Math.Abs(dataset[i].Item2 - y))
                    {
                        H = Math.Abs(dataset[i].Item1 - x) + Math.Abs(dataset[i].Item2 - y);
                        if (result_h != H)
                        {
                            stop = true;
                            break;
                        }
                    }
                }

                if (!stop)
                {
                    // 答えのXとY
                    result_x = x;
                    result_y = y;
                    break;
                }
            }
            if (!stop) break;
        }
        result_h = 0;
        for (int i = 0; i < N; i++)
        {
            if (dataset[i].Item3 != 0)
            {
                result_h = dataset[i].Item3 + Math.Abs(dataset[i].Item1 - result_x) + Math.Abs(dataset[i].Item2 - result_y);
                break;
            }
        }
        Console.WriteLine(result_x + " " + result_y + " " +result_h);
    }
}

Measured memory_bytes: 11220