#include <bits/stdc++.h>
using namespace std;

int cx, cy, n, x[104], y[104], h[104], xt, yt, ht;

int main() {
	cin>>n;
	ht = -1;
	for(int i = 0;i<n;i++){
		cin>>x[i]>>y[i]>>h[i];
		if(h[i])	xt = x[i], yt = y[i], ht = h[i];
	}
	for(cx = 0; cx<=100; cx++)
		for(cy = 0; cy<=100; cy++){
			int height = ht + abs(xt-cx) + abs(yt - cy);
			if(ht == -1)	height = 1;
			bool ok = true;
			for(int i = 0;i<n;i++)
				if(max(height - abs(x[i] - cx) - abs(y[i] - cy), 0) != h[i])
					ok = false;
			if(ok){
				cout<<cx<<' '<<cy<<' '<<height;
				return 0;
			}
		}
	// your code goes here
	return 0;
}