// 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.1552105537833415x):
#include <iostream>

#include <cmath>

using namespace std;

int main()

{

    int n;

    cin>>n;

    int num[101][3];

    for(int i=0;i!=n;i++)

    {

        cin>>num[i][0]>>num[i][1]>>num[i][2];

    }

    for(int i=0;i!=101;i++)

    {

        for(int j=0;j!=101;j++)

        {

            int first_non_zero_h=0;

            while(num[first_non_zero_h][2]==0)

            {

                first_non_zero_h++;

            }

            int h=abs(num[first_non_zero_h][0]-i)+abs(num[first_non_zero_h][1]-j)+num[first_non_zero_h][2];

            for(int k=0;k!=n;k++)

            {

                if(max(0,h-abs(num[k][0]-i)-abs(num[k][1]-j))!=num[k][2]) break;

                if(k==n-1)

                {

                    cout<<i<<' '<<j<<' '<<h;

                    return 0;

                }

            }

        }

    }

}