#include <iostream>
#include <cstdlib>
#include <time.h>
#include <algorithm>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <array>
#include <string>
#include <iomanip>
#include <cstring>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define mp make_pair
#define eb emplace_back
#define F first
#define S second
using namespace std;
using namespace __gnu_pbds;

typedef long long int ll;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ost;
using pll = pair<ll, pair<ll, ll> >;

const ll maxN = 1e7;
const ll INF = 1e17;
const ll MOD = 1e9 + 7;

ll xs[] = {-1, 1, 0, 0, -1, 1, 1, -1};
ll ys[] = {0, 0, -1, 1, -1, 1, -1, 1};

ll segtree[maxN << 2];
ll lazy[maxN << 2];
ll A[maxN];

inline ll left(ll x){
    return x << 1;
}

inline ll right(ll x){
    return (x<<1) + 1;
}

void build(ll node, ll start, ll end){
    if(start == end)
        segtree[node] = A[start];
    else{
        ll mid = (start + end)/2;
        build(left(node), start, mid);
        build(right(node), mid+1, end);
        segtree[node] = segtree[left(node)] + segtree[right(node)];
    }
}

void update(ll node, ll start, ll end, ll l, ll r, ll val){
    if(lazy[node] != 0){
        segtree[node] += (end-start+1)*lazy[node];
        if(start != end){
            lazy[left(node)] += lazy[node];
            lazy[right(node)] += lazy[node];
        }
        lazy[node] = 0;
    }
    if(start > end or l > start or r < end)
        return ;
    else if(start >= l and r >= end){
        segtree[node] += val;
        if(start != end){
            lazy[left(node)] += val;
            lazy[right(node)] += val;
        }
    }
    else{
        ll mid=(start + end)/2;
        update(left(node), start, mid, l, r, val);
        update(right(node), mid+1, end, l, r, val);
        segtree[node] = segtree[left(node)] + segtree[right(node)];
    }
}

ll sums(ll node, ll start, ll end, ll l, ll r){
    if(lazy[node] != 0){
        segtree[node] += (end-start+1)*lazy[node];
        if(start != end){
            lazy[left(node)] += lazy[node];
            lazy[right(node)] += lazy[node];
        }
        lazy[node] = 0;
    }
    if(l > end or r < start or start > end)
        return 0;
    if(l <= start and r >= end)
        return segtree[node];
    ll mid = (start+end)/2;
    return sums(left(node), start, mid, l , r) + sums(right(node), mid + 1, end, l , r);
}

int main(){
    cin.sync_with_stdio(false);
    cin.tie(0);
    ll n, kt;
    cin >> n;
    pll a[n];
    for(ll i=0; i<n; i++){
    	cin >> a[i].F >> a[i].S.F >> a[i].S.S;
    	if(a[i].S.S > 0)
    		kt = i;
    }
    for(ll i=0; i<=100; i++){
        for(ll j=0; j<=100; j++){
            ll h = a[kt].S.S + abs(i - a[kt].F) + abs(j - a[kt].S.F);
            bool ns = true;
            for(ll k=0; k<n; k++){
                if(a[k].S.S != max(h-abs(i-a[k].F)-abs(j-a[k].S.F), 0LL)){
                    ns = false;
                    break;
                }
            }
            if(ns){
                cout << i << " " << j << " " << h;
                return 0;
            }
        }
    }
    return 0;
}

Measured memory_bytes: 3612