n = int(eval(input()))

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



for cx in range(101):

    for cy in range(101):

        for xi, yi, hi in p:

            if hi > 0:

                h = abs(xi - cx) + abs(yi - cy) + hi

                break

        if all(max(h - abs(xi - cx) - abs(yi - cy), 0) == hi for xi, yi, hi in p):

            print((cx, cy, h))

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

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

p.sort(key=lambda x: x[2], reverse=True)



for cx in range(101):

    for cy in range(101):

        x0, y0, h0 = p[0]

        h = abs(x0 - cx) + abs(y0 - cy) + h0

        if all(max(h - abs(xi - cx) - abs(yi - cy), 0) == hi for xi, yi, hi in p):

            print((cx, cy, h))

            exit()
n = int(eval(input()))
p = [list(map(int, input().split())) for _ in range(n)]
for cx in range(101):
    for cy in range(101):
        for xi, yi, hi in p:
            if hi > 0:
                h = abs(xi - cx) + abs(yi - cy) + hi
                break
        if all(max(h - abs(xi - cx) - abs(yi - cy), 0) == hi for xi, yi, hi in p):
            print((cx, cy, h))
            exit()

n = int(eval(input()))
p = [list(map(int, input().split())) for _ in range(n)]
p.sort(key=lambda x: x[2], reverse=True)
for cx in range(101):
    for cy in range(101):
        x0, y0, h0 = p[0]
        h = abs(x0 - cx) + abs(y0 - cy) + h0
        if all(max(h - abs(xi - cx) - abs(yi - cy), 0) == hi for xi, yi, hi in p):
            print((cx, cy, h))
            exit()

+p.sort(key=lambda x: x[2], reverse=True) -        for xi, yi, hi in p: -            if hi > 0: -                h = abs(xi - cx) + abs(yi - cy) + hi -                break +        x0, y0, h0 = p[0] +        h = abs(x0 - cx) + abs(y0 - cy) + h0