#include <bits/stdc++.h>
#define For(i, begin, end) for(int i=begin;i<end;i++)
#define Rep(i, n) For(i,0,n)
#define Sort(v) sort(v.begin(),v.end())
using namespace std;

int main(){
  int N;cin>>N;
  vector<int> x(N),y(N),h(N);
  int x0,y0,h0=-1;
  Rep(i,N){
    cin>>x[i]>>y[i]>>h[i];
    if(h0==-1&&h[i]>0){
      x0=x[i];y0=y[i];h0=h[i];
    }
  }
  Rep(ax,101){
    Rep(ay,101){
      bool f=true;
      int H=h0+abs(ax-x0)+abs(ay-y0);
      Rep(i,N){
        int H0=max(0,H-abs(ax-x[i])-abs(ay-y[i]));
        if(H0!=h[i])f=false;
      }
      if(f){
        cout<<ax<<" "<<ay<<" "<<H;
        return 0;
      }
    }
  }
  
  return 0;
}