//  Created by conan1024hao in 2019.
//  Copyright © 2019 conan1024hao. All rights reserved.
//  専用ライブラリです、自由にコピーして構いません。
//  感谢看我的代码！Wechat:conan1024hao QQ:810396815
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define INF 10e16
#define MOD 1000000007
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll>P;
long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }
long long LCM(long long a, long long b)  {return a/GCD(a,b)*b;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
ll cmp(pair<ll,string>a,pair<ll,string> b){
        if(a.fi!=b.fi)
        return a.fi<b.fi;
        else
        return a.se<b.se;
}

//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
int main(){//問題をちゃんと見ろ!!!!!!!!!!!!!!!!!      llか??????????
    cin.tie(0);
    ios::sync_with_stdio(false);
    //-------------------------------
    int n;cin>>n;
    vector<int>x(n),y(n);vector<ll>h(n);
    for(int i=0;i<n;i++)
        cin>>x[i]>>y[i]>>h[i];
    ll cx,cy,H;
    for(cx=0;cx<=100;cx++){
        for(cy=0;cy<=100;cy++){
            H=-1;
            for(int i=0;i<n;i++){
                if(h[i]!=0){
                    if(H!=abs(cx-x[i])+abs(cy-y[i])+h[i]){
                        H=abs(cx-x[i])+abs(cy-y[i])+h[i];
                        int abc=1;
                        for(int j=0;j<n;j++){
                            if(h[j]!=(mmax(H-abs(cx-x[j])-abs(cy-y[j]),0)))
                                abc=0;
                        }
                        if(abc==1){
                            cout<<cx<<" "<<cy<<" "<<H<<endl;
                            return 0;
                        }
                    }
                }
            }
        }
    }
    if(H==-1){
        for(cx=0;cx<=100;cx++){
            for(cy=0;cy<=100;cy++){
                
                    
                H=abs(cx-x[0])+abs(cy-y[0])+h[0];
                            int abc=1;
                            for(int j=0;j<n;j++){
                                if(h[j]!=(mmax(H-abs(cx-x[j])-abs(cy-y[j]),0)))
                                    abc=0;
                            }
                            if(abc==1){
                                cout<<cx<<" "<<cy<<" "<<H<<endl;
                                return 0;
                            }
                        
                    }
                
            }
        
    }
   /* for(int i=0;i<n;i++){
        if(h[i]==0){
            cout<<x[i]<<" "<<y[i]<<" "<<h[i]<<endl;
            return 0;
        }
    }*/
    //-------------------------------
    return 0;
}
//---------------------------------------------------------------------------




Measured memory_bytes: 256