#include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(ll i=0;i<(n);++i)
#define reps(i,n) for(ll i=1;i<=(n);++i)
#define repr(i,n) for(ll i=(n);i>=0;--i)
#define all(a) a.begin(),a.end()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(all(a),greater<>())
#define SZ(a) (ll)(a.size())
#define debg(a) cout<<#a<<" "<<a<<endl;
#define out(a) cout<<(a)<<endl
#define LINE puts("------------------");
using ll = long long;
using str = string;
using D = double;
using vl = vector<ll>;
using pl = pair<ll,ll>;
using vp = vector<pair<ll,ll>>;
using vertex = struct vertex {ll to,cost;vertex(ll to,ll cost):to(to),cost(cost){}};
using AdjList = vector<vector<vertex>>;
using edge = struct edge{ll from,to,cost;edge(ll from,ll to,ll cost):from(from),to(to),cost(cost){}};
using Edges = vector<edge>;
constexpr long long INF = (1LL<<60);
constexpr long long MOD = (1e9+7);
constexpr long long LMAX = LLONG_MAX;
inline void YN(bool b){cout<<(b?"Yes":"No")<<endl;}
template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
template<class T>inline bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>inline bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
inline void dump(){cout<<endl;}
template<class Head,class... Tail>
inline void dump(Head&& head, Tail&&... tail){
  cout<<head<<", ";
  dump(forward<Tail>(tail)...);
} // output
inline void input(){}
template<class Head,class... Tail>
inline void input(Head&& head, Tail&&... tail){
  cin>>head;
  input(forward<Tail>(tail)...);
} // input
template<typename T>
inline ostream &operator<<(ostream&out,const vector<T>&v){
  for(const auto&element:v)out<<element<<", ";
  return out;
} // vector<>
template<typename T1, typename T2>
inline ostream &operator<<(ostream&out,const pair<T1,T2>&p){
  out<<p.first<<", "<<p.second;
  return out;
} // pair<>
template<typename T>
inline ostream &operator<<(ostream&out,const set<T>&st){
  for(const auto&elemnt:st)out<<elemnt<<", ";
  return out;
} // set<>
template<typename T1,typename T2>
inline ostream &operator<<(ostream&out,const vector<pair<T1,T2>>&vp){
  for(const auto &element:vp)
    out<<element.first<<", "<<element.second<<"\n";
  return out;
} // vector<pair<>>
template<typename T1,typename T2>
inline ostream &operator<<(ostream&out,const map<T1,T2>&mp){
  for(const auto &element:mp){
    out<<element.first<<", "<<element.second<<"\n";
  }
  return out;
} // map<>
template<typename T>
inline istream &operator>>(istream&input,vector<T>&v){
  for(auto &elemnt:v)input>>elemnt;
  return input;
} // input,vector<>

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<fixed<<setprecision(10);
  
  ll n,X,Y,H;
  cin>>n;
  vector<ll> x(n),y(n),h(n);
  rep(i,n){
    cin>>x[i]>>y[i]>>h[i];
    if(h[i]!=0){X=x[i];Y=y[i];H=h[i];}
  }
  
  for(ll cx=0;cx<=100;++cx){
    for(ll cy=0;cy<=100;++cy){
      ll _H=abs(cx-X)+abs(cy-Y)+H;
      bool ok=true;
      rep(i,n){
        ll tmp=_H-abs(cx-x[i])-abs(cy-y[i]);
        chmax(tmp,0LL);
        if(h[i]!=tmp)ok=false;
      }
      if(ok){
        cout<<cx<<" "<<cy<<" "<<_H<<endl;
        return 0;
      }
    }
  }
  
  
  return 0;
}


Measured memory_bytes: 256