#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll MOD = 1e9+7;

int main(){
  ll n;
  cin>>n;
  ll x[111],y[111],h[111];
  for(int i=0;i<n;i++)
	cin>>x[i]>>y[i]>>h[i];
  for(ll i=0;i<101;i++)
	for(ll j=0;j<101;j++){
	  ll H;
	  for(ll k=0;k<n;k++){
		if(h[k]==0)continue;
		H=h[k]+abs(i-x[k])+abs(j-y[k]);
		break;
	  }
	  int f=0;
	  for(int k=0;k<n;k++){
		ll tmp=max(H-abs(i-x[k])-abs(j-y[k]),0LL);
		if(tmp!=h[k])f=1;
	  }
	  if(f)continue;
	  cout<<i<<" "<<j<<" "<<H<<endl;
	  return 0;
	}
  return 0;
}
