#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;

int N;
int x[100],y[100],h[100];

bool judge(int H,int Cx,int Cy){
	int i,H1;
	for(i=0;i<N;i++){
		if(abs(max(H-abs(x[i]-Cx)-abs(y[i]-Cy),0)-h[i])<1e-6)
		;
		else return 0;
	}
	return 1;    
	
}

int main(){
	int i,H;
	cin>>N;

	for(i=0;i<N;i++)
	    cin>>x[i]>>y[i]>>h[i];
	i=0;    
	while(1){
		if(h[i])
		    break;
		i++;    
	}
	for(int j=0;j<101;j++)
	    for(int k=0;k<101;k++){
	        H=h[i]+abs(x[i]-j)+abs(y[i]-k);
	        bool m=judge(H,j,k);
	        if(m){
	        	cout<<j<<" "<<k<<" "<<H;
	        	return 0;
			}
        }
    return 0;}