#include<cstdio>
#include<algorithm>

using namespace std;

int main(){
	int n; scanf("%d", &n);
	int x[100], y[100], h[100];
	for(int i = 0; i < n; i++) scanf("%d %d %d", &x[i] ,&y[i], &h[i]);
	for(int cx = 0; cx <= 100; cx++) for(int cy = 0; cy <= 100; cy++){
		int H;
		for(int i = 0; i < n; i++) if(h[i] > 0){
			H = h[i] + abs(x[i] - cx) + abs(y[i] - cy);
			break;
		}
		int i;
		for(i = 0; i < n; i++){
			int t = max(H - abs(x[i] - cx) - abs(y[i] - cy), 0);
			if(t != h[i]) break;
		}
		if(i == n){ printf("%d %d %d\n", cx, cy, H); return 0; }
	}
	return 0;
}