#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <string>
using namespace std;

int N;
int X[110], Y[110], H[110];
bool flag;

int main(){
	cin >> N;
	for (int i = 0; i < N; i++)
		cin >> X[i] >> Y[i] >> H[i];
	flag = false;
	for (int x = 0; x <= 100 && !flag; x++)
		for (int y = 0; y <= 100 && !flag; y++){
			int h = 0;
			flag = true;
			for (int i = 0; i < N; i++)
				if (H[i] > 0){
					if (h == 0)
						h = H[i] + abs(X[i] - x) + abs(Y[i] - y);
					else if (h != H[i] + abs(X[i] - x) + abs(Y[i] - y))
						flag = false;
				}
			if (flag)
				printf("%d %d %d\n", x, y, h);
		}
}