from sys import stdin

from itertools import product



N, *xyh = list(map(int, stdin.read().split()))



xyh = list(zip(*[iter(xyh)] * 3))

xyh.sort(key=lambda x: x[2], reverse=True)



x1, y1, h1 = xyh[0]

for X, Y in product(list(range(101)), list(range(101))):

    H = h1 + abs(x1-X) + abs(y1-Y)

    if all([max(H-abs(x-X)-abs(y-Y), 0) == h for x, y, h in xyh[1:]]):

        print((X, Y, H))

        break
from sys import stdin

from itertools import product



N, *xyh = list(map(int, stdin.read().split()))



xyh = list(zip(*[iter(xyh)] * 3))

xyh.sort(key=lambda x: x[2], reverse=True)



x1, y1, h1 = xyh[0]

for X, Y in product(list(range(101)), list(range(101))):

    H = h1 + abs(x1-X) + abs(y1-Y)

    if all(max(H-abs(x-X)-abs(y-Y), 0) == h for x, y, h in xyh[1:]):

        print((X, Y, H))

        break
from sys import stdin
from itertools import product

N, *xyh = list(map(int, stdin.read().split()))
xyh = list(zip(*[iter(xyh)] * 3))
xyh.sort(key=lambda x: x[2], reverse=True)
x1, y1, h1 = xyh[0]
for X, Y in product(list(range(101)), list(range(101))):
    H = h1 + abs(x1 - X) + abs(y1 - Y)
    if all([max(H - abs(x - X) - abs(y - Y), 0) == h for x, y, h in xyh[1:]]):
        print((X, Y, H))
        break

from sys import stdin
from itertools import product

N, *xyh = list(map(int, stdin.read().split()))
xyh = list(zip(*[iter(xyh)] * 3))
xyh.sort(key=lambda x: x[2], reverse=True)
x1, y1, h1 = xyh[0]
for X, Y in product(list(range(101)), list(range(101))):
    H = h1 + abs(x1 - X) + abs(y1 - Y)
    if all(max(H - abs(x - X) - abs(y - Y), 0) == h for x, y, h in xyh[1:]):
        print((X, Y, H))
        break

-    if all([max(H - abs(x - X) - abs(y - Y), 0) == h for x, y, h in xyh[1:]]): +    if all(max(H - abs(x - X) - abs(y - Y), 0) == h for x, y, h in xyh[1:]):