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[101] points;
	foreach (i; 0 .. N) {
		auto data = readln.split;
		Point p = Point(data[0].to!int, data[1].to!int, data[2].to!int);
		points[i] = p;
	}
	
	if (N == 1) { auto p = points[0]; writeln(p.x, " ", p.y, " ", p.h); return; }
	
	while (true) {
		foreach (x; 0 .. 101) foreach (y; 0 .. 101) {
			auto height = points[0].h + (x-points[0].x).abs + (y-points[0].y).abs;
			bool flag = true;
			foreach (i; 0 .. N) {
				auto p = points[i];
				if (height != p.h + (x-p.x).abs + (y-p.y).abs) { flag = false; break; }
			}
			if (flag) { writeln( x, " ", y, " ", height ); return; }
		}
	}
	
}