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 main():

    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()



main()
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 main():
    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()


main()

-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 main(): +    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() + + +main()