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

struct point
{
    int x,y;
    int h;
    point(int x=0,int y=0,int h=0):x(x),y(y),h(h) {}
}points[105];

bool cmp(const point &a,const point &b)
{
    return a.h<b.h;
}

int main()
{
    int xi,yi,hi;
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d%d%d",&points[i].x,&points[i].y,&points[i].h);
    }
    bool flag;
    for(xi=0;xi<=100;xi++){
        for(yi=0;yi<=100;yi++){
            for(hi=points[n-1].h;hi<=points[n-1].h+205;hi++){
                flag = true;
                for(int i=0;i<n;i++){
                    int hk=points[i].h;
                    int xk=points[i].x;
                    int yk=points[i].y;
                    if(hi!=hk+abs(xi-xk)+abs(yi-yk)){
                        flag = false;
                        break;
                    }
                }
                if(flag){
                    printf("%d %d %d\n",xi,yi,hi);
                    return 0;
                }
            }
        }
    }
    return 0;
}
