n=int(eval(input()))

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

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



ansh=-1

ans=[[]]

flag=True

for cx in range(0,101):

  if flag==False:

    break

    

  for cy in range(0,101):

    ansh = 0

    for pira in xyh:

      if ansh==0:

        ansh=pira[2]+(abs(cx-pira[0])+abs(cy-pira[1]))

        ans[0]=[cx,cy,ansh]

        

      elif len(ans[0])>0 and max(ansh -(abs(cx-pira[0])+abs(cy-pira[1])), 0) != pira[2]:

        ans[0]=[]

    if len(ans[0])>0:

      flag=False

      break

print((*ans[0]))

n=int(eval(input()))

xyh=[]

for i in range(n):

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

  xyh.append([h,x,y])

xyh.sort(reverse=True)

ans=0



for cx in range(101):

  for cy in range(101):

    for N in range(n):

      if abs(xyh[0][1]-cx)+abs(xyh[0][2]-cy)+xyh[0][0]>0:

        H=abs(xyh[0][1]-cx)+abs(xyh[0][2]-cy)+xyh[0][0]

      else:

        break

      if xyh[N][0]!=max(H-abs(xyh[N][1]-cx)-abs(xyh[N][2]-cy),0):

        break

      if N == n-1:

        ans=[cx,cy,H]

print((*ans))
n = int(eval(input()))
xyh = [list(map(int, input().split())) for i in range(n)]
xyh.sort(key=lambda x: x[2], reverse=True)
ansh = -1
ans = [[]]
flag = True
for cx in range(0, 101):
    if flag == False:
        break
    for cy in range(0, 101):
        ansh = 0
        for pira in xyh:
            if ansh == 0:
                ansh = pira[2] + (abs(cx - pira[0]) + abs(cy - pira[1]))
                ans[0] = [cx, cy, ansh]
            elif (
                len(ans[0]) > 0
                and max(ansh - (abs(cx - pira[0]) + abs(cy - pira[1])), 0) != pira[2]
            ):
                ans[0] = []
        if len(ans[0]) > 0:
            flag = False
            break
print((*ans[0]))

n = int(eval(input()))
xyh = []
for i in range(n):
    x, y, h = list(map(int, input().split()))
    xyh.append([h, x, y])
xyh.sort(reverse=True)
ans = 0
for cx in range(101):
    for cy in range(101):
        for N in range(n):
            if abs(xyh[0][1] - cx) + abs(xyh[0][2] - cy) + xyh[0][0] > 0:
                H = abs(xyh[0][1] - cx) + abs(xyh[0][2] - cy) + xyh[0][0]
            else:
                break
            if xyh[N][0] != max(H - abs(xyh[N][1] - cx) - abs(xyh[N][2] - cy), 0):
                break
            if N == n - 1:
                ans = [cx, cy, H]
print((*ans))

-xyh = [list(map(int, input().split())) for i in range(n)] -xyh.sort(key=lambda x: x[2], reverse=True) -ansh = -1 -ans = [[]] -flag = True -for cx in range(0, 101): -    if flag == False: -        break -    for cy in range(0, 101): -        ansh = 0 -        for pira in xyh: -            if ansh == 0: -                ansh = pira[2] + (abs(cx - pira[0]) + abs(cy - pira[1])) -                ans[0] = [cx, cy, ansh] -            elif ( -                len(ans[0]) > 0 -                and max(ansh - (abs(cx - pira[0]) + abs(cy - pira[1])), 0) != pira[2] -            ): -                ans[0] = [] -        if len(ans[0]) > 0: -            flag = False -            break -print((*ans[0])) +xyh = [] +for i in range(n): +    x, y, h = list(map(int, input().split())) +    xyh.append([h, x, y]) +xyh.sort(reverse=True) +ans = 0 +for cx in range(101): +    for cy in range(101): +        for N in range(n): +            if abs(xyh[0][1] - cx) + abs(xyh[0][2] - cy) + xyh[0][0] > 0: +                H = abs(xyh[0][1] - cx) + abs(xyh[0][2] - cy) + xyh[0][0] +            else: +                break +            if xyh[N][0] != max(H - abs(xyh[N][1] - cx) - abs(xyh[N][2] - cy), 0): +                break +            if N == n - 1: +                ans = [cx, cy, H] +print((*ans))