using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Numerics;
using static System.Console;
using static System.Math;

namespace AtCoder
{
    public class Program
    {
        const bool IsTest = false;

        const string t1 = "4\n2 3 5\n2 1 5\n1 2 5\n3 2 5";
        const string t2 = "2\n0 0 100\n1 1 98";
        const string t3 = "3\n99 1 191\n100 1 192\n99 0 192";

        public static void Main(string[] args)
        {
            if (!IsTest) {
                new Program().Solve(new ConsoleInput(Console.In));
            } else {
                new Program().Solve(new ConsoleInput(new StringReader(t1)));
                new Program().Solve(new ConsoleInput(new StringReader(t2)));
                new Program().Solve(new ConsoleInput(new StringReader(t3)));
            }
        }

        public void Solve(ConsoleInput cin)
        {
            var n = cin.ReadLineAs<int>();
            var N = n.Item1;
            var x = new int[N];
            var y = new int[N];
            var h = new long[N];
            for (var i = 0; i < N; i++) {
                var xyh = cin.ReadLineAs<int, int, long> ();
                x[i] = xyh.Item1;
                y[i] = xyh.Item2;
                h[i] = xyh.Item3;
            }
            // たった100*100*100 なので全部ためす
            for (var cx = 0; cx <= 100; cx++) {
                for (var cy = 0; cy <= 100; cy++) {
                    long H = -1;
                    var found = true;
                    long hMax = 9000000000L;
                    for (var i = 0; i < N; i++) {
                        var mh = Math.Abs(cx - x[i]) + Math.Abs(cy - y[i]);
                        if (h[i] == 0) {
                            if (mh < hMax) {
                                hMax = mh;
                                if (H != -1 && H > hMax) {
                                    found = false;
                                    break;
                                }
                            }
                            continue;
                        }
                        var H2 = mh + h[i];
                        if (H == -1) {
                            H = H2;
                            if (H > hMax) {
                                found = false;
                                break;
                            }
                        } else if (H != H2) {
                            found = false;
                            break;
                        }
                    }
                    if (found == true) {
                        Console.WriteLine(string.Format("{0} {1} {2}", cx, cy, H));
                        return;
                    }
                }
            }
        }
    }

    public class ConsoleInput
    {
        private readonly System.IO.TextReader _stream;
        private readonly char _separator = ' ';
        private string _curLine;
        private string[] _curLineSplitted;
        private int _curItemIndex;
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
        }
        public T Read<T>()
        {
            var converter = System.ComponentModel.TypeDescriptor.GetConverter(typeof(T));
            if (converter == null) {
                throw new Exception(string.Format("TypeDescriptor.GetConverter {0}", typeof(T).Name));
            }
            return (T)converter.ConvertFromString(ReadString());
        }
        public T[] ReadArray<T>(long N)
        {
            var ret = new T[N];
            for (long i = 0; i < N; i++) {
                ret[i] = Read<T>();
            }
            return ret;
        }
        public Tuple<T> ReadLineAs<T>()
        {
            ReadLine();
            return new Tuple<T>(Read<T>());
        }
        public Tuple<T, S> ReadLineAs<T, S>()
        {
            ReadLine();
            return new Tuple<T, S>(Read<T>(), Read<S>());
        }
        public Tuple<T, S, U> ReadLineAs<T, S, U>()
        {
            ReadLine();
            return new Tuple<T, S, U>(Read<T>(), Read<S>(), Read<U>());
        }
        public Tuple<T, S, U, V> ReadLineAs<T, S, U, V>()
        {
            ReadLine();
            return new Tuple<T, S, U, V>(Read<T>(), Read<S>(), Read<U>(), Read<V>());
        }
        public Tuple<T, S, U, V, R> ReadLineAs<T, S, U, V, R>()
        {
            ReadLine();
            return new Tuple<T, S, U, V, R>(Read<T>(), Read<S>(), Read<U>(), Read<V>(), Read<R>());
        }

        public string ReadString()
        {
            return _curLineSplitted[_curItemIndex++];
        }
        public void ReadLine()
        {
            _curLine = _stream.ReadLine();
            if (_curLine == null) {
                throw new System.Exception("No more lines");
            }
            _curLineSplitted = _curLine.Split(_separator);
            _curItemIndex = 0;
        }
    }
}



Measured memory_bytes: 14304