N = int(eval(input()))

L = []

for i in range(N):

  L.append(list(map(int,input().split())))

for j in range(N):

  if L[j][2] != 0:

    karix = L[j][0]

    kariy = L[j][1]

    karih = L[j][2]

    break

for p in range(0,101):

  for q in range(0,101):

    cnt = 0

    kouhoH = karih+abs(karix-p)+abs(kariy-q)

    for r in range(N):

      if  L[r][2] == max(kouhoH-abs(L[r][0]-p)-abs(L[r][1]-q),0):

        cnt += 1

    if cnt == N:

      print((p,q,kouhoH))

      exit()
N = int(eval(input()))

L = []

for i in range(N):

  L.append(list(map(int,input().split())))

H = 0

for X in range(101):

  for Y in range(101):

    for i in range(N):

      h = 0

      if L[i][2] != 0:

        h = L[i][2]

        break

    flag = True

    H = h+abs(L[i][0]-X)+abs(L[i][1]-Y)

    for j in range(N):

      if L[j][2] != max(H-abs(L[j][0]-X)-abs(L[j][1]-Y),0):

        flag = False

        break

    if flag:

      print((X,Y,H))

      exit()
N = int(eval(input()))
L = []
for i in range(N):
    L.append(list(map(int, input().split())))
for j in range(N):
    if L[j][2] != 0:
        karix = L[j][0]
        kariy = L[j][1]
        karih = L[j][2]
        break
for p in range(0, 101):
    for q in range(0, 101):
        cnt = 0
        kouhoH = karih + abs(karix - p) + abs(kariy - q)
        for r in range(N):
            if L[r][2] == max(kouhoH - abs(L[r][0] - p) - abs(L[r][1] - q), 0):
                cnt += 1
        if cnt == N:
            print((p, q, kouhoH))
            exit()

N = int(eval(input()))
L = []
for i in range(N):
    L.append(list(map(int, input().split())))
H = 0
for X in range(101):
    for Y in range(101):
        for i in range(N):
            h = 0
            if L[i][2] != 0:
                h = L[i][2]
                break
        flag = True
        H = h + abs(L[i][0] - X) + abs(L[i][1] - Y)
        for j in range(N):
            if L[j][2] != max(H - abs(L[j][0] - X) - abs(L[j][1] - Y), 0):
                flag = False
                break
        if flag:
            print((X, Y, H))
            exit()

-for j in range(N): -    if L[j][2] != 0: -        karix = L[j][0] -        kariy = L[j][1] -        karih = L[j][2] -        break -for p in range(0, 101): -    for q in range(0, 101): -        cnt = 0 -        kouhoH = karih + abs(karix - p) + abs(kariy - q) -        for r in range(N): -            if L[r][2] == max(kouhoH - abs(L[r][0] - p) - abs(L[r][1] - q), 0): -                cnt += 1 -        if cnt == N: -            print((p, q, kouhoH)) +H = 0 +for X in range(101): +    for Y in range(101): +        for i in range(N): +            h = 0 +            if L[i][2] != 0: +                h = L[i][2] +                break +        flag = True +        H = h + abs(L[i][0] - X) + abs(L[i][1] - Y) +        for j in range(N): +            if L[j][2] != max(H - abs(L[j][0] - X) - abs(L[j][1] - Y), 0): +                flag = False +                break +        if flag: +            print((X, Y, H))