import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
import std.math;

void main() {
	auto N = readln.split[0].to!int;
	alias Point = Tuple!(int, "x", int, "y", int, "h");
	Point[] points;
	Point highest_point;
	foreach (i; 0 .. N) {
		auto data = readln.split;
		Point p = Point(data[0].to!int, data[1].to!int, data[2].to!int);
		points ~= p;
		if (highest_point.h < p.h) highest_point = p;
	}
	
	if (N == 1) { auto p = points[0]; writeln(p.x, " ", p.y, " ", p.h); return; }
	
	auto height = highest_point.h;
	while (true) {
		int[101][101] flag;
		foreach (point; points) {
			auto diff = height - point.h;
			if (diff == 0) { flag[point.x][point.y]++; continue; }
			auto vecs = tuple(1,1).repeat(diff).array ~ tuple(1, -1).repeat(diff).array ~ tuple(-1, -1).repeat(diff).array ~ tuple(-1, 1).repeat(diff).array;
			int x = point.x - diff, y = point.y;
			foreach (vec; vecs) {
				if ( 0<=x && x<=100 && 0<=y && y<=100) {
					flag[x][y]++;
					if (flag[x][y] == N) { writeln(x, " ", y, " ", height); return; }
				}
				x += vec[0], y += vec[1];
			}
		}
		height++;
	}
	
}