#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
#include <cassert>
#include <utility>
#include <iomanip>
#include <chrono>
#include <random>
#include <bitset>

using namespace std;

#define sz(x) (int) x.size()
#define unique(x) x.erase(unique(x.begin(), x.end()), x.end())
#define all(a) a.begin(), a.end()
#define sqr(x) ((x) * (x)) 
#define y1 aksjdaskdjksjfksdjf
#define left kdnvldvoiwejifejg
#define right lkdsjflksdjfdjfk
#define prev asdasfsadjkjsdfjs
#define tm aklsjdasjdasjdkdjjf
#define lcm hddalkwjeidjjhasda
#define random_shuffle asdasdd

const int MAXN = 105;

int n;
int x[MAXN], y[MAXN], h[MAXN];

int main() { 

  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d %d", &x[i], &y[i], &h[i]);
  }

  for (int cx = 0; cx <= 100; cx++) {
    for (int cy = 0; cy <= 100; cy++) {
      int curH = -1;
      int mx = 2 * 1e9;
      bool good = true;
      for (int i = 0; i < n; i++) {
        if (h[i] != 0) {
          int cur = h[i] + abs(cx - x[i]) + abs(cy - y[i]);
          if (curH == -1) {
            curH = cur;
          } else {
            if (cur != curH) {
              good = false;
            }
          }
        } else {
          mx = min(mx, abs(cx - x[i]) + abs(cy - y[i]));
        }
      }
      if (good && curH != -1 && curH <= mx) {
        cout << cx << " " << cy << " " << curH << endl;
        return 0;
      }
    }
  }

  return 0;
}
