N = int(eval(input()))

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

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

for cx in range(101):

    for cy in range(101):

        x, y, h = xyh[0]

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

        for i in range(1, N):

            x, y, h = xyh[i]

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

                break

        else:

            print((cx, cy, H))

            exit()
import sys

input = sys.stdin.readline



N = int(eval(input()))

x, y, h = list(zip(*[list(map(int, input().split())) for _ in range(N)]))

j = -1

for i in range(N):

    if h[i] != 0:

        j = i

        break

for cx in range(101):

    for cy in range(101):

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

        for i in range(N):

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

                break

        else:

            print((cx, cy, H))



N = int(eval(input()))
xyh = [tuple(map(int, input().split())) for _ in range(N)]
xyh.sort(key=lambda a: -a[2])
for cx in range(101):
    for cy in range(101):
        x, y, h = xyh[0]
        H = h + abs(cx - x) + abs(cy - y)
        for i in range(1, N):
            x, y, h = xyh[i]
            if max(H - abs(cx - x) - abs(cy - y), 0) != h:
                break
        else:
            print((cx, cy, H))
            exit()

import sys

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

+import sys + +input = sys.stdin.readline -xyh = [tuple(map(int, input().split())) for _ in range(N)] -xyh.sort(key=lambda a: -a[2]) +x, y, h = list(zip(*[list(map(int, input().split())) for _ in range(N)])) +j = -1 +for i in range(N): +    if h[i] != 0: +        j = i +        break -        x, y, h = xyh[0] -        H = h + abs(cx - x) + abs(cy - y) -        for i in range(1, N): -            x, y, h = xyh[i] -            if max(H - abs(cx - x) - abs(cy - y), 0) != h: +        H = h[j] + abs(x[j] - cx) + abs(y[j] - cy) +        for i in range(N): +            if h[i] != max(H - abs(x[i] - cx) - abs(y[i] - cy), 0): -            exit()