// Original C++ solution (slower):






/**

 *      purpose : 

 *      author  : kyomukyomupurin

 *      created : 

**/



// input/output

#include <iostream>

#include <fstream>

#include <sstream>

// container class

#include <array>

#include <deque>

#include <map>

#include <queue>

#include <set>

#include <stack>

#include <string>

#include <tuple>

#include <unordered_map>

#include <unordered_set>

#include <vector>

// math, algorithm

#include <algorithm>

#include <cmath>

#include <complex>

#include <numeric>

// etc

#include <bitset>

#include <cassert>

#include <cctype>

#include <cstring>

#include <chrono>

#include <functional>

#include <iomanip>

#include <random>

#include <utility>

// using-directive

using namespace std;

// alias template

using int64 = long long;

using uint64 = unsigned long long;

using vi = vector<int>;

using vl = vector<int64>;

using pii = pair<int, int>;

using pll = pair<int64, int64>;

// text macro replacement

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)

#define all(v) (v).begin(), (v).end()

#define rall(v) (v).rbegin(), (v).rend()

#define print(x) cout << (x) << '\n'

#define debug(x) cerr << #x << ": " << (x) << '\n'

#define dbg(v) for (size_t _ = 0; _ < v.size(); ++_){cerr << #v << "[" << _ << "] : " << v[_] << '\n';}

// variadic template

template<typename T> inline void chmin(T &a, T b) {if (a > b) a = b; return;}

template<typename T> inline void chmax(T &a, T b) {if (a < b) a = b; return;}

// constant

const int INF = (1<<30) - 1;

const int64 INF64 = (1LL<<62) - 1;

const int MOD = 1000000007;



int main(){

  ios_base::sync_with_stdio(false);

  cin.tie(nullptr);



  int n; cin >> n;

  vi x(n), y(n), h(n);



  rep(i, n) cin >> x[i] >> y[i] >> h[i];



  int mx = *max_element(all(h));



  for (int cx = 0; cx <= 100; ++cx) {

    for (int cy = 0; cy <= 100; ++cy) {

      for (int hh = mx; hh <= mx + 200; ++hh) {

        bool flag = true;

        for (int i = 0; i < n; ++i) {

          if (h[i] != max(hh - abs(cx - x[i]) - abs(cy - y[i]), 0)){

            flag = false;

            break;

            //cout << cx << " " << cy << " " << hh << '\n'; return 0;

          }

        }

        if (flag){cout << cx << " " << cy << " " << hh << '\n'; return 0;}

      }

    }

  }



  return 0;

}

// Optimized solution to the same problem (faster):
/**

 *    author  : 𝒌𝒚𝒐𝒎𝒖𝒌𝒚𝒐𝒎𝒖𝒑𝒖𝒓𝒊𝒏

 *    created : 2020-04-05 13:15:40

**/



#include <iostream>

#include <deque>

#include <map>

#include <queue>

#include <set>

#include <stack>

#include <string>

#include <vector>

#include <algorithm>

#include <cmath>

#include <complex>

#include <numeric>

#include <bitset>

#include <cassert>

#include <cctype>

#include <iomanip>

#include <random>

#include <utility>

#include <chrono>



using namespace std;



using int64 = long long;



template<class T> using binary_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template<class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) { os << '{'; size_t n = vec.size(); for (size_t i = 0; i < n; ++i) { os << vec[i]; if (i != n - 1) os << ','; } os << '}'; return os; }

template<class T, class U> std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& p) { return os << '{' << p.first << " " << p.second << '}'; }

template<class T, class U> std::ostream& operator<<(std::ostream& os, const std::map<T, U>& mp) { os << '{'; for (auto it = mp.begin(); it != mp.end(); ++it) { os << '{' << it->first << ':' << it->second << '}'; if (it != --mp.end()) os << ','; } os << '}'; return os; }

template<class T> std::ostream& operator<<(std::ostream& os, const std::set<T>& st) { os << '{'; for (auto it = st.begin(); it != st.end(); ++it) { os << *it; if (it != --st.end()) os << ','; } os << '}'; return os; }

template<class T> std::istream& operator>>(std::istream& is, std::vector<T>& vec) { size_t n = vec.size(); for (size_t i = 0; i < n; ++i) is >> vec[i]; return is; }



#define all(_) begin(_), end(_)

#define rall(_) rbegin(_), rend(_)



#ifdef LOCAL

#define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", debug_out(__VA_ARGS__)

#else

#define debug(...) 1728

#endif



void debug_out() { std::cerr << '\n'; }



template <class Head, class... Tail>

void debug_out(Head&& head, Tail&&... tail) {

  std::cerr << head;

  if (sizeof...(Tail) != 0) std::cerr << ", ";

  debug_out(std::forward<Tail>(tail)...);

}



int main() {

  ios_base::sync_with_stdio(false);

  cin.tie(nullptr);



  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];



  int pos = -1;

  for (int i = 0; i < n; ++i) {

    if (h[i] > 0) {

      pos = i; break;

    }

  }



  for (int cx = 0; cx <= 100; ++cx) {

    for (int cy = 0; cy <= 100; ++cy) {

      int H = h[pos] + abs(x[pos] - cx) + abs(y[pos] - cy);

      bool flag = true;

      for (int i = 0; i < n; ++i) {

        if (h[i] != max(H - abs(x[i] - cx) - abs(y[i] - cy), 0)) flag = false;

      }

      if (flag) {

        cout << cx << " " << cy << " " << H << endl; return 0;

      }

    }

  }



  return 0;

}

// Fastest known solution for this problem: