import numpy as np



N = int(eval(input()))



point = [[int(item) for item in input().split()] for _ in range(N)]

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



ans = np.zeros((101,101))



for i,p in enumerate(point):

  if i == 0:

    for j in range(101):

      for k in range(101):

        H = p[2] + abs(j - p[0]) + abs(k - p[1])

        ans[j,k] = H

      #  print(ans[j,k])

  else:

    for j in range(101):

      for k in range(101):

        if not ans[j,k] == 0:

          if ans[j,k] != p[2] + abs(j - p[0]) + abs(k - p[1]):

            ans[j,k] = 0

  if len(ans[ans!=0]) <= 1:

    break

x,y = np.where(ans!=0)

print((x[0],y[0],int(ans[x[0],y[0]])))
N = int(eval(input()))

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

C = [[0]*101 for i in range(101)]

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

for X in range(101):

  for Y in range(101):

    tmp1 = -1

    flg = 0

    for i in range(N):

      x,y,h = P[i]

      if h != 0 and tmp1 == -1:

        tmp1 = abs(X-x)+abs(Y-y)+h

      elif tmp1 != -1:

        tmp2 = abs(X-x)+abs(Y-y)+h

        if h != 0: 

          if tmp1 != tmp2:

            flg = 1

            break

        if h == 0:

          if tmp1 > tmp2:

            flg = 1

            break

    if flg == 0:

      print((X, Y, tmp1))        

      exit()
import numpy as np

N = int(eval(input()))
point = [[int(item) for item in input().split()] for _ in range(N)]
point.sort(key=lambda x: x[2], reverse=True)
ans = np.zeros((101, 101))
for i, p in enumerate(point):
    if i == 0:
        for j in range(101):
            for k in range(101):
                H = p[2] + abs(j - p[0]) + abs(k - p[1])
                ans[j, k] = H
            #  print(ans[j,k])
    else:
        for j in range(101):
            for k in range(101):
                if not ans[j, k] == 0:
                    if ans[j, k] != p[2] + abs(j - p[0]) + abs(k - p[1]):
                        ans[j, k] = 0
    if len(ans[ans != 0]) <= 1:
        break
x, y = np.where(ans != 0)
print((x[0], y[0], int(ans[x[0], y[0]])))

N = int(eval(input()))
P = [list(map(int, input().split())) for i in range(N)]
C = [[0] * 101 for i in range(101)]
P.sort(key=lambda x: x[2], reverse=True)
for X in range(101):
    for Y in range(101):
        tmp1 = -1
        flg = 0
        for i in range(N):
            x, y, h = P[i]
            if h != 0 and tmp1 == -1:
                tmp1 = abs(X - x) + abs(Y - y) + h
            elif tmp1 != -1:
                tmp2 = abs(X - x) + abs(Y - y) + h
                if h != 0:
                    if tmp1 != tmp2:
                        flg = 1
                        break
                if h == 0:
                    if tmp1 > tmp2:
                        flg = 1
                        break
        if flg == 0:
            print((X, Y, tmp1))
            exit()

-import numpy as np - -point = [[int(item) for item in input().split()] for _ in range(N)] -point.sort(key=lambda x: x[2], reverse=True) -ans = np.zeros((101, 101)) -for i, p in enumerate(point): -    if i == 0: -        for j in range(101): -            for k in range(101): -                H = p[2] + abs(j - p[0]) + abs(k - p[1]) -                ans[j, k] = H -            #  print(ans[j,k]) -    else: -        for j in range(101): -            for k in range(101): -                if not ans[j, k] == 0: -                    if ans[j, k] != p[2] + abs(j - p[0]) + abs(k - p[1]): -                        ans[j, k] = 0 -    if len(ans[ans != 0]) <= 1: -        break -x, y = np.where(ans != 0) -print((x[0], y[0], int(ans[x[0], y[0]]))) +P = [list(map(int, input().split())) for i in range(N)] +C = [[0] * 101 for i in range(101)] +P.sort(key=lambda x: x[2], reverse=True) +for X in range(101): +    for Y in range(101): +        tmp1 = -1 +        flg = 0 +        for i in range(N): +            x, y, h = P[i] +            if h != 0 and tmp1 == -1: +                tmp1 = abs(X - x) + abs(Y - y) + h +            elif tmp1 != -1: +                tmp2 = abs(X - x) + abs(Y - y) + h +                if h != 0: +                    if tmp1 != tmp2: +                        flg = 1 +                        break +                if h == 0: +                    if tmp1 > tmp2: +                        flg = 1 +                        break +        if flg == 0: +            print((X, Y, tmp1)) +            exit()