n = int(eval(input()))

ll = sorted([list(map(int,input().split())) for _ in range(n)],key=lambda k:k[2])[::-1]

for cx in range(101):

  for cy in range(101):

    ch = ll[0][2]+abs(ll[0][0]-cx)+abs(ll[0][1]-cy)

    for x,y,h in ll:

      if max(ch-abs(x-cx)-abs(y-cy),0) != h:

        break

    else:

      print((cx,cy,ch))

      break

  else:

    continue

  break
ll = [list(map(int,input().split())) for _ in range(int(eval(input())))]

ll.sort(key=lambda k:k[2],reverse=1)

x,y,h = ll[0]

for cx in range(101):

  for cy in range(101):

    ch = h+abs(x-cx)+abs(y-cy)

    for x,y,h in ll:

      if max(ch-abs(x-cx)-abs(y-cy),0) != h:

        break

    else:

      print((cx,cy,ch))

      break

  else:

    continue

  break
n = int(eval(input()))
ll = sorted([list(map(int, input().split())) for _ in range(n)], key=lambda k: k[2])[
    ::-1
]
for cx in range(101):
    for cy in range(101):
        ch = ll[0][2] + abs(ll[0][0] - cx) + abs(ll[0][1] - cy)
        for x, y, h in ll:
            if max(ch - abs(x - cx) - abs(y - cy), 0) != h:
                break
        else:
            print((cx, cy, ch))
            break
    else:
        continue
    break

ll = [list(map(int, input().split())) for _ in range(int(eval(input())))]
ll.sort(key=lambda k: k[2], reverse=1)
x, y, h = ll[0]
for cx in range(101):
    for cy in range(101):
        ch = h + abs(x - cx) + abs(y - cy)
        for x, y, h in ll:
            if max(ch - abs(x - cx) - abs(y - cy), 0) != h:
                break
        else:
            print((cx, cy, ch))
            break
    else:
        continue
    break

-n = int(eval(input())) -ll = sorted([list(map(int, input().split())) for _ in range(n)], key=lambda k: k[2])[ -    ::-1 -] +ll = [list(map(int, input().split())) for _ in range(int(eval(input())))] +ll.sort(key=lambda k: k[2], reverse=1) +x, y, h = ll[0] -        ch = ll[0][2] + abs(ll[0][0] - cx) + abs(ll[0][1] - cy) +        ch = h + abs(x - cx) + abs(y - cy)