#include<iostream>
using namespace std;
int main()
{
	int x[100]={0},y[100]={0};
	long long h[100]={0};
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>x[i]>>y[i]>>h[i];
	int cx,cy;
	long long H,temp;
	for(int cx=0;cx<=100;cx++)
	{
		for(int cy=0;cy<=100;cy++)
		{
			H=h[0]+((x[0]-cx)>0?x[0]-cx:cx-x[0])+((y[0]-cy)>0?y[0]-cy:cy-y[0]);
			for(int i=1;i<n;i++)
			{
				temp=h[i]+((x[i]-cx)>0?x[i]-cx:cx-x[i])+((y[i]-cy)>0?y[i]-cy:cy-y[i]);
				if(temp!=H)
					break;
				if(i==n-1)
				{
					cout<<cx<<" "<<cy<<" "<<H;
					return 0;
				}
			}
		}
	}
}