#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <math.h>
#include <memory.h>
#include <vector>
using namespace std;
const int MAXN=105;
int xyh[MAXN][5],n;
int main(){
	cin>>n;
	int i,j,k,x,f,s,t;
	for(i=1;i<=n;i++)
		cin>>xyh[i][1]>>xyh[i][2]>>xyh[i][3];
	s=1;
	while(xyh[s][3]==0)s++;
	for(i=0;i<=100;i++){
		for(j=0;j<=100;j++){
			x=xyh[s][3]+abs(xyh[s][1]-i)+abs(xyh[s][2]-j);
			f=1;
			for(k=1;k<=n;k++){
				t=max(0,x-abs(xyh[k][1]-i)-abs(xyh[k][2]-j));
				if(xyh[k][3]!=t){
					f=0;break;
				}
			}
			if(f==1){printf("%d %d %d",i,j,x);return 0;}
		}
	}
	return 0;
}
