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

public class Program
{
    public void Proc()
    {
        int inputCount = int.Parse(Reader.ReadLine());
        for (int i = 0; i < inputCount; i++) {
            Elements.Add(new Piramix(Reader.ReadLine()));
        }
        Elements = Elements.OrderByDescending(a => a.Height).ToList();
        int xMin = Elements[0].X;
        int xMax = Elements[0].X;
        int yMin = Elements[0].Y;
        int yMax = Elements[0].Y;
        for (int i = 0; i < Elements.Count; i++)
        {
            if(Elements[i].Height == Elements[0].Height) {
                continue;
            }
            if (Elements[0].X > Elements[i].X)
            {
                if (Elements[0].X == xMin)
                {
                    xMin = Elements[i].X;
                }
            }
            else if (Elements[0].X < Elements[i].X)
            {
                if (Elements[0].X == xMax)
                {
                    xMax = Elements[i].X;
                }
            }
            if (Elements[0].Y > Elements[i].Y)
            {
                if (Elements[0].Y == yMin)
                {
                    yMin = Elements[i].Y;
                }
            }
            else if (Elements[0].Y < Elements[i].Y)
            {
                if (Elements[0].Y == yMax)
                {
                    yMax = Elements[i].Y;
                }
            }
            if (Elements[0].X != xMin && Elements[0].X != xMax&& Elements[0].Y != yMin &&Elements[0].Y != yMax) {
                break;
            }
        }
        if(xMax == Elements[0].X) {
            xMax = 100;
        }
        if(xMin == Elements[0].X) {
            xMin = 0;
        }
        if(yMax == Elements[0].Y) {
            yMax = 100;
        }
        if(yMin == Elements[0].Y) {
            yMin = 0;
        }
        xMax = 100;
        xMin = 0;
        yMax = 100;
        yMin = 0;
        for (int i = xMin; i <= xMax; i++)
        {
            for (int j = yMin; j <= yMax; j++)
            {
                long height = Elements[0].Height + Math.Abs(Elements[0].X - i) + Math.Abs(Elements[0].Y - j);
                bool isMatch = true;
                for (int k = 1; k < Elements.Count; k++)
                {
                    long h = Elements[k].Height + Math.Abs(Elements[k].X - i) + Math.Abs(Elements[k].Y - j);
                    if(Elements[k].Height <= 0) {
                        if(h >= height) {
                            continue;
                        }
                    } else if(h == height) {
                        continue;
                    }
                    isMatch = false;
                    break;
                }
                if (isMatch)
                {
                    Console.WriteLine(i + " " + j + " " + height);
                    break;
                }
            }
        }
    }

    private List<Piramix> Elements = new List<Piramix>();



    private class Piramix {
        public int X;
        public int Y;
        public long Height;
        public Piramix(string inpt) {
            long[] tmp = inpt.Split(' ').Select(a => long.Parse(a)).ToArray();
            this.X = (int)tmp[0];
            this.Y = (int)tmp[1];
            this.Height = tmp[2];
        }
    }

    public class Reader
    {
        static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"



2
0 0 100
1 1 98


";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}


Measured memory_bytes: 13524