#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
  int N;
  cin >> N;
  vector<int> x(N), y(N), h(N);
  for (int i = 0; i < N; i++) cin >> x[i] >> y[i] >> h[i];
  for (int cx = 0; cx <= 100; cx++) {
    for (int cy = 0; cy <= 100; cy++) {
      bool f = true;
      int H = 1;
      for (int i = 0; i < N; i++) {
        if (h[i] > 0) H = (abs(x[i] - cx) + abs(y[i] - cy)) + h[i];
      }
      for (int i = 0; i < N; i++) {
        if (max(0, H - (abs(x[i] - cx) + abs(y[i] - cy))) != h[i]) f = false;
      }
      if (f) {
        cout << cx << " " << cy << " " << H << endl;
      }
    }
  }
}