using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace AtCoder.C
{
    public class Program
    {
        public static void Main() { var r = GetResult(); Debug.WriteLine(r); Console.Write(r); }

        private static object GetResult()
        {
            var N = ReadLong();
            var xyh = new List<long[]>();
            var xyh0 = new List<long[]>();
            for (var i = 0; i < N; i++)
            {
                var (x, y, z) = Read3Longs();
                if (z == 0)
                {
                    xyh0.Add(new long[3] { x, y, z });
                    continue;
                }
                xyh.Add(new long[3] { x, y, z });
            }
            for (var i = 0; i <= 100; i++)
            {
                for (var j = 0; j <= 100; j++)
                {
                    var isComp = true;
                    var first = true;
                    var H = 0L;
                    foreach (var item in xyh)
                    {
                        if (first)
                        {
                            H = CulcH(i, j, item[0], item[1], item[2]);
                            first = false;
                            continue;
                        }
                        if (H != CulcH(i, j, item[0], item[1], item[2]))
                        {
                            isComp = false;
                            break;
                        }
                    }
                    if (isComp)
                    {
                        var seiyaku = true;
                        foreach (var item in xyh0)
                        {
                            if (H - Math.Abs(item[0] - i) - Math.Abs(item[1] - j) > 0)
                            {
                                seiyaku = false;
                                break;
                            }
                        }
                        if (seiyaku)
                        {
                            return $"{i} {j} {H}";
                        }
                        else
                        {
                            continue;
                        }
                    }
                }
            }
            return null;
        }
        private static long CulcH(long cx, long cy, long x, long y, long h)
        {
            if (h == 0)
            {
                return -1;
            }
            return h + Math.Abs(x - cx) + Math.Abs(y - cy);
        }
        #region Console.Read

        public static string ReadText() { return Console.ReadLine(); }
        public static List<string> ReadTexts() { return Console.ReadLine().Split(' ').ToList(); }
        public static long ReadLong() { return long.Parse(Console.ReadLine()); }
        public static (long, long) Read2Longs() { var ls = ReadLongs(); return (ls[0], ls[1]); }
        public static (long, long, long) Read3Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2]); }
        public static (long, long, long, long) Read4Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3]); }
        public static (long, long, long, long, long) Read5Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3], ls[4]); }
        public static List<long> ReadLongs() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); }

        #endregion
    }
}


Measured memory_bytes: 28212