N = int(eval(input()))

x, y, h = [0]*N, [0]*N, [0]*N

for i in range(N):

    x[i], y[i], h[i] = list(map(int, input().split()))



for cx in range(0, 101):

    for cy in range(0, 101):

        for i in range(N):

            if h[i] > 0:

                H = h[i] + abs(x[i]-cx)+abs(y[i]-cy)

        

        for i in range(N):

            if h[i] != max(0, H-abs(x[i]-cx)-abs(y[i]-cy)):

                break

        else:

            print((cx, cy, H))

            exit()
import sys



N = int(eval(input()))

xyh = [list(map(int, input().split())) for i in range(N)]



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



        

if N==1:

    print((xyh[0][0], xyh[0][1] , xyh[0][2]))

else:

    for xc in range(101):

        for yc in range(101):

            H = xyh[-1][2] + abs(xyh[-1][0] - xc) + abs(xyh[-1][1] - yc)

            for xi, yi, hi in xyh:

                if hi !=  max(H - abs(xi - xc) - abs(yi - yc), 0):

                    break

            else:

                print((xc, yc, H))

                sys.exit()

N = int(eval(input()))
x, y, h = [0] * N, [0] * N, [0] * N
for i in range(N):
    x[i], y[i], h[i] = list(map(int, input().split()))
for cx in range(0, 101):
    for cy in range(0, 101):
        for i in range(N):
            if h[i] > 0:
                H = h[i] + abs(x[i] - cx) + abs(y[i] - cy)
        for i in range(N):
            if h[i] != max(0, H - abs(x[i] - cx) - abs(y[i] - cy)):
                break
        else:
            print((cx, cy, H))
            exit()

import sys

N = int(eval(input()))
xyh = [list(map(int, input().split())) for i in range(N)]
xyh.sort(key=lambda x: x[2])
if N == 1:
    print((xyh[0][0], xyh[0][1], xyh[0][2]))
else:
    for xc in range(101):
        for yc in range(101):
            H = xyh[-1][2] + abs(xyh[-1][0] - xc) + abs(xyh[-1][1] - yc)
            for xi, yi, hi in xyh:
                if hi != max(H - abs(xi - xc) - abs(yi - yc), 0):
                    break
            else:
                print((xc, yc, H))
                sys.exit()

+import sys + -x, y, h = [0] * N, [0] * N, [0] * N -for i in range(N): -    x[i], y[i], h[i] = list(map(int, input().split())) -for cx in range(0, 101): -    for cy in range(0, 101): -        for i in range(N): -            if h[i] > 0: -                H = h[i] + abs(x[i] - cx) + abs(y[i] - cy) -        for i in range(N): -            if h[i] != max(0, H - abs(x[i] - cx) - abs(y[i] - cy)): -                break -        else: -            print((cx, cy, H)) -            exit() +xyh = [list(map(int, input().split())) for i in range(N)] +xyh.sort(key=lambda x: x[2]) +if N == 1: +    print((xyh[0][0], xyh[0][1], xyh[0][2])) +else: +    for xc in range(101): +        for yc in range(101): +            H = xyh[-1][2] + abs(xyh[-1][0] - xc) + abs(xyh[-1][1] - yc) +            for xi, yi, hi in xyh: +                if hi != max(H - abs(xi - xc) - abs(yi - yc), 0): +                    break +            else: +                print((xc, yc, H)) +                sys.exit()