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

void main() {
  int N; readlnTo(N);
  auto data = new Tuple!(int, int, int)[N];
  
  int tx, ty, th;
  foreach(i; 0..N) {
    readlnTo(data[i][0], data[i][1], data[i][2]);
    if(data[i][2] >= 1) {
      tx = data[i][0];
      ty = data[i][1];
      th = data[i][2];
    }
  }

  foreach(px; 0..101) {
    foreach(py; 0..101) {
      int ph = th + abs(px - tx) + abs(py - ty);
      bool ok = true;
      
      foreach(e; data) {
        int h = max(ph - abs(e[0] - px) - abs(e[1] - py), 0);
        if(h != e[2])
          ok = false;
      }

      if(ok) {
        "%d %d %d".writefln(px, py, ph);
        return;
      }
    }
  }
}

// helpers
void readlnTo(T...)(ref T t) {
  auto s = readln.split;
  assert(s.length == t.length);
  foreach(ref ti; t) {
    ti = s[0].to!(typeof(ti));
    s = s[1..$];
  }
}
