using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Practice
{
    class Program
    {
        private static int ReadAndParseInt()
        {
            return int.Parse(Console.ReadLine());
        }
        private static int[] ReadAndParseIntArr()
        {
            return Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
        }
        private static long ReadAndParseLong()
        {
            return long.Parse(Console.ReadLine());
        }
        private static long[] ReadAndParseLongArr()
        {
            return Array.ConvertAll(Console.ReadLine().Split(' '), long.Parse);
        }
        static void Main(string[] args)
        {
            SolveA(args);
            //SolveB(args);
            //SolveC(args);
            //SolveD(args);


        }
        private struct Coordinate
        {
            public int x;
            public int y;
            public int h;
        }
        private static Coordinate[] coarr;

        private const long MOD = 1000000007;
        static void SolveA(string[] args)
        {
            int n = ReadAndParseInt();
            coarr = new Coordinate[n];
            for(int i=0;i<n;++i)
            {
                var xyh = ReadAndParseIntArr();
                var co = new Coordinate()
                {
                    x = xyh[0],
                    y = xyh[1],
                    h = xyh[2]
                };
                coarr[i] = co;
            }
            for (int cx = 0; cx <= 100; cx++)
            {
                for(int cy = 0;cy<=100;cy++)
                {
                    int height;
                    if(IsValidCoordinate(cx, cy, out height))
                    {
                        Console.WriteLine($"{cx} {cy} {height}");
                        return;

                    }
                }
            }
        }
       
        private static bool IsValidCoordinate(int cx, int cy, out int height)
        {
            var heightCandidates = new HashSet<int>();
            int n = coarr.Length;
            for(int i=0;i<n;++i)
            {
                int tmpHeight = CalcHeight(i, cx, cy);
                if(!heightCandidates.Contains(tmpHeight))
                {
                    heightCandidates.Add(tmpHeight);
                }
            }

            foreach(int tmpHeight in heightCandidates)
            {
                if( IsValidCoordinate(cx, cy, tmpHeight))
                {
                    height = tmpHeight;
                    return true;
                }
            }
            height = 0;
            return false;
        }

        private static int CalcHeight(int idx, int cx, int cy)
        {
            var co = coarr[idx];
            return co.h+ Math.Abs(co.x - cx) + Math.Abs(co.y - cy);
        }

        private static bool IsValidCoordinate(int cx, int cy, int height)
        {
            foreach(var co in coarr)
            {
                if( co.h != Math.Max(height - Math.Abs(co.x - cx) - Math.Abs(co.y - cy), 0))
                {
                    return false;
                }
            }
            return true;
        }
    }
}

Measured memory_bytes: 17604