#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
int N;
int x[101],y[101],h[101],a,b,c;
int main(){
	cin >> N;
	for(int i=0;i<N;i++){
		
		cin >>x[i] >> y[i] >> h[i];
		if(h[i]>0){a=x[i];b=y[i] ;c=h[i];}
	}

	for(int Cx=0;Cx<=100;Cx++){
		for(int Cy=0;Cy<=100;Cy++){
			int H=c+abs(Cx-a)+abs(Cy-b);
			
			bool f=true;
			for(int k=0;k<N;k++){
				
				if(h[k]!= max(H-abs(Cx-x[k])-abs(Cy-y[k]),0) ){
					f=false; 
					//cout << Cx << " " << Cy << " " << H << endl; 
					break;
				}
			}
			if(f==true){
				cout << Cx << " " << Cy << " " << H << endl;return 0;
			}
		}
	}
	
}
