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

auto rdsp(){return readln.splitter;}
void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;}
void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);}
void readS(T)(size_t n,ref T t){t=new T(n);foreach(ref v;t){auto r=rdsp;foreach(ref j;v.tupleof)pick(r,j);}}

void main()
{
  int n; readV(n);
  struct P { int x, y, h; }
  P[] p; readS(n, p);

  auto pf = p.find!(pi => pi.h > 0);
  if (pf.empty) {
    foreach (x; 0..101)
      foreach (y; 0..101)
        if (p.all!(pi => pi.x != x && pi.y != y)) {
          writeln(x, " ", y, " ", 1);
          return;
        }
  } else {
    auto pt = pf[0];
    foreach (x; 0..101)
      foreach (y; 0..101) {
        auto h = pt.h + (x-pt.x).abs + (y-pt.y).abs;
        if (p.all!(pi => max(h - (x-pi.x).abs - (y-pi.y).abs, 0) == pi.h)) {
          writeln(x, " ", y, " ", h);
          return;
        }
      }
  }
}
