import sys



N = int(eval(input()))



list = []

for i in range(0, N):

    x, y, h = [int(x) for x in input().split()]

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



for X in range(0, 101):

    for Y in range(0, 101):

        b = True

        H = 0

        for Cx, Cy, Ch in list:

            if Ch != 0:

                H = Ch + abs(X - Cx) + abs(Y - Cy)

        for Cx, Cy, Ch in list:

            h = max(H - abs(X - Cx) - abs(Y - Cy), 0)

            if Ch != h:

                b = False

        if b == True:

            print((X, Y, H))

            sys.exit(0)

n = int(eval(input()))

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



for i in c:

    if i[2] > 0:

        o = i

        break



for cx in range(101):

    for cy in range(101):

        H = o[2] + abs(o[0] - cx) + abs(o[1] - cy)

        f = True

        for i in c:

            x, y, h = i[0], i[1], i[2]

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

                f = False

                break

        if f:

            print((cx, cy, H))

            exit()
import sys

N = int(eval(input()))
list = []
for i in range(0, N):
    x, y, h = [int(x) for x in input().split()]
    list.append((x, y, h))
for X in range(0, 101):
    for Y in range(0, 101):
        b = True
        H = 0
        for Cx, Cy, Ch in list:
            if Ch != 0:
                H = Ch + abs(X - Cx) + abs(Y - Cy)
        for Cx, Cy, Ch in list:
            h = max(H - abs(X - Cx) - abs(Y - Cy), 0)
            if Ch != h:
                b = False
        if b == True:
            print((X, Y, H))
            sys.exit(0)

n = int(eval(input()))
c = [list(map(int, input().split())) for _ in range(n)]
for i in c:
    if i[2] > 0:
        o = i
        break
for cx in range(101):
    for cy in range(101):
        H = o[2] + abs(o[0] - cx) + abs(o[1] - cy)
        f = True
        for i in c:
            x, y, h = i[0], i[1], i[2]
            if h != max(0, H - abs(x - cx) - abs(y - cy)):
                f = False
                break
        if f:
            print((cx, cy, H))
            exit()

-import sys - -N = int(eval(input())) -list = [] -for i in range(0, N): -    x, y, h = [int(x) for x in input().split()] -    list.append((x, y, h)) -for X in range(0, 101): -    for Y in range(0, 101): -        b = True -        H = 0 -        for Cx, Cy, Ch in list: -            if Ch != 0: -                H = Ch + abs(X - Cx) + abs(Y - Cy) -        for Cx, Cy, Ch in list: -            h = max(H - abs(X - Cx) - abs(Y - Cy), 0) -            if Ch != h: -                b = False -        if b == True: -            print((X, Y, H)) -            sys.exit(0) +n = int(eval(input())) +c = [list(map(int, input().split())) for _ in range(n)] +for i in c: +    if i[2] > 0: +        o = i +        break +for cx in range(101): +    for cy in range(101): +        H = o[2] + abs(o[0] - cx) + abs(o[1] - cy) +        f = True +        for i in c: +            x, y, h = i[0], i[1], i[2] +            if h != max(0, H - abs(x - cx) - abs(y - cy)): +                f = False +                break +        if f: +            print((cx, cy, H)) +            exit()