n = int(eval(input()))



dots = []

for _ in range(n):

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

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



x_, y_, h_ = sorted(dots, key=lambda x: x[2], reverse=True)[1]



for cx in range(101):

    for cy in range(101):

        H = h_+abs(x_ - cx) + abs(y_ - cy)



        ans = []

        for x, y, h in dots:

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

                ans.append((cx, cy, H))



        if len(ans) == n:

            print((*ans[0]))

            exit()
n = int(eval(input()))

xyh = [list(map(int, input().split())) for _ in range(n)]

x_, y_, h_ = sorted(xyh, key=lambda x: x[2], reverse=True)[1]



for cx in range(101):

    for cy in range(101):

        H = h_+abs(x_ - cx) + abs(y_ - cy)

        for x, y, h in xyh:

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

                break

        else:

            print((cx, cy, H))

            exit()
n = int(eval(input()))
dots = []
for _ in range(n):
    x, y, h = list(map(int, input().split()))
    dots.append((x, y, h))
x_, y_, h_ = sorted(dots, key=lambda x: x[2], reverse=True)[1]
for cx in range(101):
    for cy in range(101):
        H = h_ + abs(x_ - cx) + abs(y_ - cy)
        ans = []
        for x, y, h in dots:
            if max(H - abs(x - cx) - abs(y - cy), 0) == h:
                ans.append((cx, cy, H))
        if len(ans) == n:
            print((*ans[0]))
            exit()

n = int(eval(input()))
xyh = [list(map(int, input().split())) for _ in range(n)]
x_, y_, h_ = sorted(xyh, key=lambda x: x[2], reverse=True)[1]
for cx in range(101):
    for cy in range(101):
        H = h_ + abs(x_ - cx) + abs(y_ - cy)
        for x, y, h in xyh:
            if max(H - abs(x - cx) - abs(y - cy), 0) != h:
                break
        else:
            print((cx, cy, H))
            exit()

-dots = [] -for _ in range(n): -    x, y, h = list(map(int, input().split())) -    dots.append((x, y, h)) -x_, y_, h_ = sorted(dots, key=lambda x: x[2], reverse=True)[1] +xyh = [list(map(int, input().split())) for _ in range(n)] +x_, y_, h_ = sorted(xyh, key=lambda x: x[2], reverse=True)[1] -        ans = [] -        for x, y, h in dots: -            if max(H - abs(x - cx) - abs(y - cy), 0) == h: -                ans.append((cx, cy, H)) -        if len(ans) == n: -            print((*ans[0])) +        for x, y, h in xyh: +            if max(H - abs(x - cx) - abs(y - cy), 0) != h: +                break +        else: +            print((cx, cy, H))