N = int(eval(input()))

L = [tuple(map(int, input().split())) for _ in range(N)]



def get_H(Cx, Cy):

    for x, y, h in L:

        if h == 0:

            continue

        H = h + abs(x - Cx) + abs(y - Cy)

        if H >= 1:

            return H



def check(Cx, Cy, H):

    for x, y, h in L:

        if h != max(H - abs(x - Cx) - abs(y - Cy), 0):

            return False

    return True



for Cx in range(101):

    for Cy in range(101):

        H = get_H(Cx, Cy)

        if check(Cx, Cy, H):

            print((Cx, Cy, H))

            quit()

N = int(eval(input()))

L = [tuple(map(int, input().split())) for _ in range(N)]



xx, yy, hh = next(l for l in L if l[2] >= 1)

for Cx in range(101):

    for Cy in range(101):

        H = hh + abs(xx - Cx) + abs(yy - Cy)

        for x, y, h in L:

            if h != max(H - abs(x - Cx) - abs(y - Cy), 0):

                break

        else:

            print((Cx, Cy, H))

            quit()
N = int(eval(input()))
L = [tuple(map(int, input().split())) for _ in range(N)]


def get_H(Cx, Cy):
    for x, y, h in L:
        if h == 0:
            continue
        H = h + abs(x - Cx) + abs(y - Cy)
        if H >= 1:
            return H


def check(Cx, Cy, H):
    for x, y, h in L:
        if h != max(H - abs(x - Cx) - abs(y - Cy), 0):
            return False
    return True


for Cx in range(101):
    for Cy in range(101):
        H = get_H(Cx, Cy)
        if check(Cx, Cy, H):
            print((Cx, Cy, H))
            quit()

N = int(eval(input()))
L = [tuple(map(int, input().split())) for _ in range(N)]
xx, yy, hh = next(l for l in L if l[2] >= 1)
for Cx in range(101):
    for Cy in range(101):
        H = hh + abs(xx - Cx) + abs(yy - Cy)
        for x, y, h in L:
            if h != max(H - abs(x - Cx) - abs(y - Cy), 0):
                break
        else:
            print((Cx, Cy, H))
            quit()

- - -def get_H(Cx, Cy): -    for x, y, h in L: -        if h == 0: -            continue -        H = h + abs(x - Cx) + abs(y - Cy) -        if H >= 1: -            return H - - -def check(Cx, Cy, H): -    for x, y, h in L: -        if h != max(H - abs(x - Cx) - abs(y - Cy), 0): -            return False -    return True - - +xx, yy, hh = next(l for l in L if l[2] >= 1) -        H = get_H(Cx, Cy) -        if check(Cx, Cy, H): +        H = hh + abs(xx - Cx) + abs(yy - Cy) +        for x, y, h in L: +            if h != max(H - abs(x - Cx) - abs(y - Cy), 0): +                break +        else: