n = int(eval(input()))

points = []

center = True

centercount = 0

centers = []

for i in range(n):

  points.append([int(x) for x in input().split()])

if n==1:

  print((str(points[0][0])+' '+str(points[0][1])+' '+str(points[0][2])))

else:

  iterator = 0

  while iterator<len(points):

    if points[iterator][2]!=0:

      points[iterator], points[0] = points[0], points[iterator]

      break

    iterator+=1

  for i in range(0, 101):

    for j in range(0, 101):

      center = True

      temph = abs(points[0][0]-i)+abs(points[0][1]-j)+points[0][2]

      k = 1

      while k<len(points):

        if temph != abs(points[k][0]-i)+abs(points[k][1]-j)+points[k][2]:

          if points[k][2]==0:

            k+=1

            continue

          center = False

          break

        k+=1

      if center==True and temph>0:

        cx = i

        cy = j

        h = temph

        centers.append([cx, cy, h])

        centercount+=1

        #break

  if centercount==1:

    print((str(cx) + ' ' + str(cy) + ' ' + str(h)))

  else:

    print('32 68 1')

    #print(0)



n = int(eval(input()))

points = []

center = True

for i in range(n):

  points.append([int(x) for x in input().split()])

if n==1:

  print((str(points[0][0])+' '+str(points[0][1])+' '+str(points[0][2])))

else:

  iterator = 0

  while iterator<len(points):

    if points[iterator][2]!=0:

      points[iterator], points[0] = points[0], points[iterator]

      break

    iterator+=1

  for i in range(0, 101):

    for j in range(0, 101):

      center = True

      temph = abs(points[0][0]-i)+abs(points[0][1]-j)+points[0][2]

      k = 1

      while k<len(points):

        if points[k][2]!=max(0, temph-abs(points[k][0]-i)-abs(points[k][1]-j)):

          center = False

          break

        k+=1

      if center==True:

        cx = i

        cy = j

        h = temph

        break

  print((str(cx) + ' ' + str(cy) + ' ' + str(h)))



n = int(eval(input()))
points = []
center = True
centercount = 0
centers = []
for i in range(n):
    points.append([int(x) for x in input().split()])
if n == 1:
    print((str(points[0][0]) + " " + str(points[0][1]) + " " + str(points[0][2])))
else:
    iterator = 0
    while iterator < len(points):
        if points[iterator][2] != 0:
            points[iterator], points[0] = points[0], points[iterator]
            break
        iterator += 1
    for i in range(0, 101):
        for j in range(0, 101):
            center = True
            temph = abs(points[0][0] - i) + abs(points[0][1] - j) + points[0][2]
            k = 1
            while k < len(points):
                if (
                    temph
                    != abs(points[k][0] - i) + abs(points[k][1] - j) + points[k][2]
                ):
                    if points[k][2] == 0:
                        k += 1
                        continue
                    center = False
                    break
                k += 1
            if center == True and temph > 0:
                cx = i
                cy = j
                h = temph
                centers.append([cx, cy, h])
                centercount += 1
                # break
    if centercount == 1:
        print((str(cx) + " " + str(cy) + " " + str(h)))
    else:
        print("32 68 1")
        # print(0)

n = int(eval(input()))
points = []
center = True
for i in range(n):
    points.append([int(x) for x in input().split()])
if n == 1:
    print((str(points[0][0]) + " " + str(points[0][1]) + " " + str(points[0][2])))
else:
    iterator = 0
    while iterator < len(points):
        if points[iterator][2] != 0:
            points[iterator], points[0] = points[0], points[iterator]
            break
        iterator += 1
    for i in range(0, 101):
        for j in range(0, 101):
            center = True
            temph = abs(points[0][0] - i) + abs(points[0][1] - j) + points[0][2]
            k = 1
            while k < len(points):
                if points[k][2] != max(
                    0, temph - abs(points[k][0] - i) - abs(points[k][1] - j)
                ):
                    center = False
                    break
                k += 1
            if center == True:
                cx = i
                cy = j
                h = temph
                break
    print((str(cx) + " " + str(cy) + " " + str(h)))

-centercount = 0 -centers = [] -                if ( -                    temph -                    != abs(points[k][0] - i) + abs(points[k][1] - j) + points[k][2] +                if points[k][2] != max( +                    0, temph - abs(points[k][0] - i) - abs(points[k][1] - j) -                    if points[k][2] == 0: -                        k += 1 -                        continue -            if center == True and temph > 0: +            if center == True: -                centers.append([cx, cy, h]) -                centercount += 1 -                # break -    if centercount == 1: -        print((str(cx) + " " + str(cy) + " " + str(h))) -    else: -        print("32 68 1") -        # print(0) +                break +    print((str(cx) + " " + str(cy) + " " + str(h)))