n=int(eval(input()))

x=[-1]*n

y=[-1]*n

h=[-1]*n

for i in range(n):

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

  

cnt=0

now=0

for i in range(n):

  if h[i]>0:

    cnt+=1

    now=i

if cnt==1:

  print((x[now],y[now],h[now]))

  exit()



for cx in range(0,101):

  for cy in range(0,101):

    H=[]

    for i in range(n):

      if h[i]>0:

        H.append(h[i]+abs(cx-x[i])+abs(cy-y[i]))

    if len(set(H))==1:

      print((cx,cy,H[0]))

      exit()

n=int(eval(input()))

x=[-1]*n

y=[-1]*n

h=[-1]*n

for i in range(n):

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



mh=max(h)

for cx in range(0,101):

  for cy in range(0,101):

    for H in range(mh,mh+216):

      if all(h[j]==max(H-abs(cx-x[j])-abs(cy-y[j]),0) for j in range(n)):

        print((cx,cy,H))

        exit()

n = int(eval(input()))
x = [-1] * n
y = [-1] * n
h = [-1] * n
for i in range(n):
    x[i], y[i], h[i] = list(map(int, input().split()))
cnt = 0
now = 0
for i in range(n):
    if h[i] > 0:
        cnt += 1
        now = i
if cnt == 1:
    print((x[now], y[now], h[now]))
    exit()
for cx in range(0, 101):
    for cy in range(0, 101):
        H = []
        for i in range(n):
            if h[i] > 0:
                H.append(h[i] + abs(cx - x[i]) + abs(cy - y[i]))
        if len(set(H)) == 1:
            print((cx, cy, H[0]))
            exit()

n = int(eval(input()))
x = [-1] * n
y = [-1] * n
h = [-1] * n
for i in range(n):
    x[i], y[i], h[i] = list(map(int, input().split()))
mh = max(h)
for cx in range(0, 101):
    for cy in range(0, 101):
        for H in range(mh, mh + 216):
            if all(
                h[j] == max(H - abs(cx - x[j]) - abs(cy - y[j]), 0) for j in range(n)
            ):
                print((cx, cy, H))
                exit()

-cnt = 0 -now = 0 -for i in range(n): -    if h[i] > 0: -        cnt += 1 -        now = i -if cnt == 1: -    print((x[now], y[now], h[now])) -    exit() +mh = max(h) -        H = [] -        for i in range(n): -            if h[i] > 0: -                H.append(h[i] + abs(cx - x[i]) + abs(cy - y[i])) -        if len(set(H)) == 1: -            print((cx, cy, H[0])) -            exit() +        for H in range(mh, mh + 216): +            if all( +                h[j] == max(H - abs(cx - x[j]) - abs(cy - y[j]), 0) for j in range(n) +            ): +                print((cx, cy, H)) +                exit()