#include<iostream>
#include<cstdio>
#include<string>
#include<cmath>
using namespace std;

int H = 0, Cx, Cy;
int n;
int x[110], y[110], h[110];

bool judge(int H)
{
    for(int i = 0; i < n; i++)
    {
        if(H - (abs(x[i]-Cx)+abs(y[i]-Cy)) != 0){
            return 0;
        }
    }
        return 1;
        
    
}
int main()
{
    
    int i;
    scanf("%d", &n);
    
    for(i = 0; i < n; i++)
    {
        cin>>x[i]>>y[i]>>h[i];
    }
    
    
    int t;
    for(i = 0;i < n; i++) if(h[i]) break;
    t = i;
    for(Cx = 0; Cx <= 100; Cx++)
        for(Cy = 0; Cy <= 100; Cy++)
        {
            
            H = abs(Cx - x[t]) + abs(Cy - y[t]) + h[t];
            
            //
            if(judge(H))
            {
                cout<<Cx<<" "<<Cy<<" "<<H<<endl;
                return 0;
            }
        }
    
    
    
}
