//wrong answer
#include<iostream>

using namespace std;

int abs(int m ,int n)
{
	return m-n>0?m-n:n-m;
}

struct data{
	int x;
	int y;
	int h;
}d[105]; 

int main()
{
	int N,node=-1;
	cin>>N;
	for(int i=0;i<N;i++)
	{
		cin>>d[i].x>>d[i].y>>d[i].h;
		if (node == -1 && d[i].h != 0) node = i;
	}
	for(int i=0;i<101;i++)
		for(int j=0;j<101;j++)
		{
			int H=d[node].h+abs(d[node].x,i)+abs(d[node].y,j);
			int l=0;
			for(int k=0;k<N;k++)
			{			
				if(H-abs(d[k].x,i)-abs(d[k].y,j)==d[k].h) l++;
				}	
		//		cout<<i<<" "<<j<<" "<<H;
		//	cout<<"  *  "<<l<<"   &  "<<N<<endl;
			if(l==N) {
				cout<<i<<" "<<j<<" "<<H;
				return 0;
			}
		}
	return 0;
}


