N = int(eval(input()))



A = []

for i in range(N):

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

    A.append([x,y,h])

H = max([h for x,y,h in A])

while True:

    for i in range(100+1):

        for j in range(100+1):

            for x,y,h in A:

                tx, ty = abs(x-i), abs(y-j)

                if max(H - tx - ty, 0) != h:

                    break

            else:

                print((i,j,H))

                exit()

    H += 1

n = int(eval(input()))

py = []

start = 0

for i in range(n):

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

    if start < h:

        start = h

    py.append((x,y,h))



height = lambda x,y,cx,cy,hh:max(hh -abs(x-cx) -abs(y-cy), 0)

while True:

    for i in range(101):

        for j in range(101):

            for a,b,h in py:

                if height(a,b,i,j,start) != h:

                    # no

                    break

            else:

                # ok

                print((i,j,start))

                exit()

    start += 1

N = int(eval(input()))
A = []
for i in range(N):
    x, y, h = list(map(int, input().split()))
    A.append([x, y, h])
H = max([h for x, y, h in A])
while True:
    for i in range(100 + 1):
        for j in range(100 + 1):
            for x, y, h in A:
                tx, ty = abs(x - i), abs(y - j)
                if max(H - tx - ty, 0) != h:
                    break
            else:
                print((i, j, H))
                exit()
    H += 1

n = int(eval(input()))
py = []
start = 0
for i in range(n):
    x, y, h = list(map(int, input().split()))
    if start < h:
        start = h
    py.append((x, y, h))
height = lambda x, y, cx, cy, hh: max(hh - abs(x - cx) - abs(y - cy), 0)
while True:
    for i in range(101):
        for j in range(101):
            for a, b, h in py:
                if height(a, b, i, j, start) != h:
                    # no
                    break
            else:
                # ok
                print((i, j, start))
                exit()
    start += 1

-N = int(eval(input())) -A = [] -for i in range(N): +n = int(eval(input())) +py = [] +start = 0 +for i in range(n): -    A.append([x, y, h]) -H = max([h for x, y, h in A]) +    if start < h: +        start = h +    py.append((x, y, h)) +height = lambda x, y, cx, cy, hh: max(hh - abs(x - cx) - abs(y - cy), 0) -    for i in range(100 + 1): -        for j in range(100 + 1): -            for x, y, h in A: -                tx, ty = abs(x - i), abs(y - j) -                if max(H - tx - ty, 0) != h: +    for i in range(101): +        for j in range(101): +            for a, b, h in py: +                if height(a, b, i, j, start) != h: +                    # no -                print((i, j, H)) +                # ok +                print((i, j, start)) -    H += 1 +    start += 1