#include<iostream>
using namespace std;
int main(){
	int N;
	int x[1009],y[1009];
	int h[1009];
	cin>>N;
	for(int i=0;i<N;i++)cin>>x[i]>>y[i]>>h[i];
    int base_h=h[0];
	for(int i=0;i<=100;i++){
		for(int j=0;j<=100;j++){
			for(int k=0;k<=200;k++){
			    bool flag=true;
			    int search_h=base_h+k;
			    for(int l=0;l<N;l++){
			    	int dist=abs(x[l]-i)+abs(y[l]-j);
			    	if((search_h<dist&&h[l]!=0)||(search_h>=dist&&h[l]!=search_h-dist))flag=false;
			    }
			    if(flag==true)cout<<i<<" "<<j<<" "<<search_h<<endl;
		    }
		}
	}
}