N = int(eval(input()))

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

xyh = sorted(xyh, key = lambda x:-x[2])

mx, my, mh = xyh[0]

for Cx in range(101):

  for Cy in range(101):

    H = mh+abs(mx-Cx)+abs(my-Cy)

    if(all(h == max(0, H-abs(x-Cx)-abs(y-Cy)) for x,y,h in xyh)):

      print((Cx,Cy,H))

      exit()
from operator import itemgetter



N = int(eval(input()))

xyh = [[int(i) for i in input().split()] for _ in range(N)]



xyh.sort(key = itemgetter(2))

tx, ty, th = xyh[-1]

for Cx in range(101):

  for Cy in range(101):

    H = th + abs(tx-Cx) + abs(ty-Cy)

    if all(h == max(H-abs(x-Cx)-abs(y-Cy), 0) for x, y, h in xyh):

      print((Cx, Cy, H))

      exit()
N = int(eval(input()))
xyh = [list(map(int, input().split())) for _ in range(N)]
xyh = sorted(xyh, key=lambda x: -x[2])
mx, my, mh = xyh[0]
for Cx in range(101):
    for Cy in range(101):
        H = mh + abs(mx - Cx) + abs(my - Cy)
        if all(h == max(0, H - abs(x - Cx) - abs(y - Cy)) for x, y, h in xyh):
            print((Cx, Cy, H))
            exit()

from operator import itemgetter

N = int(eval(input()))
xyh = [[int(i) for i in input().split()] for _ in range(N)]
xyh.sort(key=itemgetter(2))
tx, ty, th = xyh[-1]
for Cx in range(101):
    for Cy in range(101):
        H = th + abs(tx - Cx) + abs(ty - Cy)
        if all(h == max(H - abs(x - Cx) - abs(y - Cy), 0) for x, y, h in xyh):
            print((Cx, Cy, H))
            exit()

+from operator import itemgetter + -xyh = [list(map(int, input().split())) for _ in range(N)] -xyh = sorted(xyh, key=lambda x: -x[2]) -mx, my, mh = xyh[0] +xyh = [[int(i) for i in input().split()] for _ in range(N)] +xyh.sort(key=itemgetter(2)) +tx, ty, th = xyh[-1] -        H = mh + abs(mx - Cx) + abs(my - Cy) -        if all(h == max(0, H - abs(x - Cx) - abs(y - Cy)) for x, y, h in xyh): +        H = th + abs(tx - Cx) + abs(ty - Cy) +        if all(h == max(H - abs(x - Cx) - abs(y - Cy), 0) for x, y, h in xyh):