#include <iostream>
#include <math.h>
using namespace std;
int abs(int x){
    return x>0?x:-x;
}

int main() {
    int n, flag;
    cin >> n;
    int xn, yn, hn;
    int x[100], y[100], h[100];
    for (int i=0; i < n;i++){
        cin >> x[i] >> y[i] >> h[i];
    }
   
    
    for(xn=0; xn < 100;xn++){
        for (yn =0;yn <100;yn++){
            hn = abs(x[0]-xn)+abs(y[0]-yn)+h[0];
            flag = 0;
            for (int j =1;j < n;j++){
                if (!(abs(x[j]-xn)+abs(y[j]-yn)+h[j]== hn)){
                    flag =1;
                    break;
                }
            
            }
            if (flag == 0)
                break;
        }
        if (flag == 0)
            break;
        
    }
    cout << xn << " " << yn << " " << hn << " " << endl;
    return 0;
}
