#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
const int MAX = 1e7;
struct node
{
    int x, y, h;
} py[MAX];
int n;
int main()
{
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
        scanf("%d%d%d", &py[i].x, &py[i].y, &py[i].h);
    for (int x = 0; x <= 100; x++)
        for (int y = 0; y <= 100; y++)
        {
            int H = py[1].h + abs(y - py[1].y) + abs(x - py[1].x);
            int flag = 1;
            for (int i = 2; i <= n; i++)
                if (H != py[i].h + abs(y - py[i].y) + abs(x - py[i].x))
                {
                    flag = 0;
                    break;
                }
            if (flag)
            {
                printf("%d %d %d\n", x, y, H);
                return 0;
            }
        }
}
