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;
	Point 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[i] = p;
		if (p.h > 0) point_ = p;
	}
	
	if (N == 1) { auto p = points[0]; writeln(p.x, " ", p.y, " ", p.h); return; }
	

	foreach (x; 0 .. 101) foreach (y; 0 .. 101) {
		auto H = point_.h + (point_.x - x).abs + (point_.y - y).abs;
		bool flag = true;
		foreach (i; 0 .. N) {
			auto p = points[i];
			if ( max(H - abs(p.x - x) - abs(p.y - y), 0) != p.h ) { flag = false; break; }
		}
		if (flag) { writeln( x, " ", y, " ", H ); return; }
	}
}