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

int n;

int main()
{
	int H = 0, Cx, Cy;
	int i, j;
	scanf("%d", &n);
	int x[n], y[n], h[n];
	for(i = 0; i < n; i++)
	{
		cin>>x[i]>>y[i]>>h[i];
	}

	int ans = 0;
	int t;
	for(i = 0;i < n; i++) if(h[i]) break;
		t = i;
	for(Cx = 0; Cx <= 100; Cx++)
		for(Cy = 0; Cy <= 100; Cy++)
			{
				int flag = 1;
				H = abs(Cx - x[t]) + abs(Cy - y[t]) + h[t];
				for(i = 0; i < n; i++)
				{
					if(H == abs(Cx - x[i]) + abs(Cy - y[i]) + h[i])
						ans = H;
					else {flag = 0; break;}
								
				}
				if(flag)
				{
					cout<<Cx<<" "<<Cy<<" "<<ans<<endl;
					return 0;
				}
			}
	
		

}
