#include <iostream>
#include <cstdio>
#include <stdio.h>
#include <stdlib.h>

#include<algorithm>
#include <math.h>
using namespace std;

int main()
{int num=0,da1,da2,flag=0;
    int a[110],b[110],c[110];
    int n;
    cin >> n;
    for(int i=0;i<n;i++)
    {
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
    }
for(int i=0;i<=100;i++)
{
    for(int j =0;j<100;j++)
    {
        if((abs(i-a[0])+abs(j-b[0])+c[0])==(abs(i-a[1])+abs(j-b[1])+c[1]))
        {//cout<< a[0]<<" "<< b[0]<<" "<<c[0]<<"(abs(i-a[0])+abs(i-b[0])+c[0]) "<<(abs(i-a[0])+abs(i-b[0])+c[0])<<" "<<a[1 ]<<" "<<b[1]<<" "<< c[1]<<"(abs(i-a[1])+abs(i-b[1])+c[1])"<<(abs(i-a[1])+abs(i-b[1])+c[1])<<'\n';
            //printf("(abs(i-a[0]):%d abs(i-b[0]):%d c[0]:%d abs(i-a[1]):%d abs(i-b[1]):%d c[1]:%d",abs(i-a[0]),abs(i-b[0]),c[0],abs(i-a[1]),abs(i-b[1]),c[1]);
           // cout << i<<" "<<j<<'\n';
            int p=1,num=2;
            while(p<n-1)
            {
            if(abs(i-a[p])+abs(j-b[p])+c[p]==abs(i-a[p+1])+abs(j-b[p+1])+c[p+1])
            {
                    p++;
                    num++;
            }
            else
            {
                break;
            }
            }
            if(num==n)
            {
                da1=i;
                da2=j;
                flag=1;
                break;
            }
        }
    }

    if(flag==1)
    break;
}

cout <<da1<<' ';
cout <<da2;
cout<<" "<<abs(da1-a[0])+abs(da2-b[0])+c[0];
}
