#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)

int n;
int x[115],y[115],h[115];

int main(){
	cin>>n;
	rep(i,n)cin>>x[i]>>y[i]>>h[i];
	rep(i,101){
		rep(j,101){
			int d=-1;
			int ma=1100000000;
			rep(k,n){
				
				if(d==-1){
					if(h[k]==0)ma=min(ma,abs(i-x[k])+abs(j-y[k]));
					else d=h[k]+(abs(i-x[k])+abs(j-y[k]));
				}
				else{
					if(h[k]==0)ma=min(ma,abs(i-x[k])+abs(j-y[k]));
					else if(d!=h[k]+(abs(i-x[k])+abs(j-y[k])))goto age;
				}
				if(ma<d)goto age;
			}
			cout<<i<<" "<<j<<" "<<d<<endl;
			return 0;
			age:;
		}
	}
	
	return 0;
}
