// Slower C++ solution:
// e-pyramid

#include <iostream>



using namespace std;



const int SIDE = 101;



int known[104][3];

int lk = 0;

int possible[11000][3];

int lp = 0;

int tmp_possible[11000][3];

int lt = 0;



int distance(int x1, int y1, int x2, int y2) {

    return abs(x1-x2) + abs(y1-y2);

}



int expect_peak_height(int xt, int yt, int xo, int yo, int ho) {

    return distance(xt, yt, xo, yo) + ho;

}



void print_possible() {

    for (int i=0; i<lp; i++) {

        cout << possible[i][0] << ' ' << possible[i][1] << ' ' << possible[i][2] << endl;

    }

}



int main() {

    int N;

    cin >> N;



    int tmp_x, tmp_y, tmp_h;

    

    for (int i=0; i<N; i++) {

        cin >> tmp_x >> tmp_y >> tmp_h;

        known[lk][0] = tmp_x;

        known[lk][1] = tmp_y;

        known[lk++][2] = tmp_h;



    }



    int first_not_zero = 0;

    // 找到第一个不为 0 的已知点

    while (known[first_not_zero][2] == 0)

        first_not_zero++;



    for (int i=0; i<SIDE; i++) {

        for (int j=0; j<SIDE; j++) {

            int x = known[first_not_zero][0];

            int y = known[first_not_zero][1];

            int h = known[first_not_zero][2];



            possible[lp][0] = i;

            possible[lp][1] = j;

            possible[lp++][2] = expect_peak_height(i, j, x, y, h);

        }

    }



    for (int i=first_not_zero+1; i<lk; i++) {

        for (int j=0; j<lp; j++) {

            int px = possible[j][0];

            int py = possible[j][1];

            int ph = possible[j][2];



            int test_x = known[i][0];

            int test_y = known[i][1];

            int test_h = known[i][2];



            if (test_h != 0) {

                if (expect_peak_height(px, py, test_x, test_y, test_h) == ph) {

                    tmp_possible[lt][0] = possible[j][0];

                    tmp_possible[lt][1] = possible[j][1];

                    tmp_possible[lt++][2] = possible[j][2];

                }

            } else {  // case of test_h = 0

                if (expect_peak_height(px, py, test_x, test_y, test_h) >= ph) {

                    tmp_possible[lt][0] = possible[j][0];

                    tmp_possible[lt][1] = possible[j][1];

                    tmp_possible[lt++][2] = possible[j][2];

                }

            }

        }

        for (int j=0; j<lt; j++) {

                possible[j][0] = tmp_possible[j][0];

                possible[j][1] = tmp_possible[j][1];

                possible[j][2] = tmp_possible[j][2];

        }

        lp = lt;

        lt = 0;

    }



    for (int i=0; i<first_not_zero; i++) {

        for (int j=0; j<lp; j++) {

            int px = possible[j][0];

            int py = possible[j][1];

            int ph = possible[j][2];



            int test_x = known[i][0];

            int test_y = known[i][1];

            int test_h = known[i][2];



            if (test_h != 0) {

                if (expect_peak_height(px, py, test_x, test_y, test_h) == ph) {

                    tmp_possible[lt][0] = possible[j][0];

                    tmp_possible[lt][1] = possible[j][1];

                    tmp_possible[lt++][2] = possible[j][2];

                }

            } else {  // case of test_h = 0

                if (expect_peak_height(px, py, test_x, test_y, test_h) >= ph) {

                    tmp_possible[lt][0] = possible[j][0];

                    tmp_possible[lt][1] = possible[j][1];

                    tmp_possible[lt++][2] = possible[j][2];

                }

            }

        }

        for (int j=0; j<lt; j++) {

                possible[j][0] = tmp_possible[j][0];

                possible[j][1] = tmp_possible[j][1];

                possible[j][2] = tmp_possible[j][2];

        }

        lp = lt;

        lt = 0;

    }





    print_possible();

}

// Faster C++ solution for the same problem (measured speedup: 1.1363652904548047x):
#include<iostream>

#include<vector>

#include<cstdio>

#include<stdio.h>

#include<cstring>

#include<algorithm>



using namespace std;

typedef long long ll;



const int mod = 1e9+7; 



int main(){

	ios::sync_with_stdio(false);

	int m,n,ans= 0,curh,k,pos;

	cin >> n;

	vector<vector<int> > points(n, vector<int>(3));

	for(int i = 0; i < n; ++i){

		cin >> points[i][0];

		cin >> points[i][1];

		cin >> points[i][2];

		if(points[i][2] != 0)pos = i;

	}

	

	for(int i = 0; i <= 100; ++i){

		for(int j = 0; j <= 100; ++j){

			curh = abs(points[pos][0]-i) + abs(points[pos][1]-j) + points[pos][2];

			 

			for(k = 0; k < n; ++k){

				if(points[k][2] == 0){

					if(curh-points[k][2] > abs(points[k][0]-i) + abs(points[k][1]-j))break;

				}else if(curh-points[k][2] != abs(points[k][0]-i) + abs(points[k][1]-j))break;

			}

			if(k == n){

				cout << i << " " << j << " " << curh;

				return 0;

			}

		}

	}

	return 0;

}