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


int main(){
	int N;
	cin>>N;
	int Cx,Cy,H; 
	int flag=0;
	int a[101][101][N+1];
	int x[N+1],y[N+1],h[N+1];
	for(int i=1;i<=N;i++){
		cin>>x[i]>>y[i]>>h[i];
	}
	for(Cx=0;Cx<=100;Cx++)
		for(Cy=0;Cy<=100;Cy++)
			for(int i=1;i<=N;i++)
				a[Cx][Cy][i]=max(abs(x[i]-Cx)+abs(y[i]-Cy)+h[i],0);
	for(int i=0;i<=100;i++)
		for(int j=0;j<=100;j++){
			flag=0;
			int x=a[i][j][1];
			for(int k=1;k<=N;k++)
				if(x!=a[i][j][k]){
					flag=1;
					break;
				}
			if(flag==0){
				Cx=i;
				Cy=j;
			}
		}
	H=max(abs(x[1]-Cx)+abs(y[1]-Cy)+h[1],0);
	cout<<Cx<<" "<<Cy<<" "<<H;
	retu