import sys

input = sys.stdin.readline



N = int(eval(input()))

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



for i in range(101):

    for j in range(101):

        for x, y, h in xyh:

            if h != 0:

                H = h + abs(i - x) + abs(j - y)

                for x, y, h in xyh:

                    if h != max(H - abs(i - x) - abs(j - y), 0):

                        break

                else:

                    print((i, j, H))

                    exit()
import sys

input = sys.stdin.readline



N = int(eval(input()))

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

xyh.sort(key=lambda i:i[2], reverse=True)

x0, y0, h0 = xyh[0]



for i in range(101):

    for j in range(101):

        H = h0 + abs(i - x0) + abs(j - y0)

        for x, y, h in xyh:

            if h > 0:

                if H != h + abs(i - x) + abs(j - y):

                    break

            else:

                if H - abs(i - x) - abs(j - y) > 0:

                    break

        else:

            print((i, j, H))

            exit()
import sys

input = sys.stdin.readline
N = int(eval(input()))
xyh = [list(map(int, input().split())) for _ in range(N)]
for i in range(101):
    for j in range(101):
        for x, y, h in xyh:
            if h != 0:
                H = h + abs(i - x) + abs(j - y)
                for x, y, h in xyh:
                    if h != max(H - abs(i - x) - abs(j - y), 0):
                        break
                else:
                    print((i, j, H))
                    exit()

import sys

input = sys.stdin.readline
N = int(eval(input()))
xyh = [list(map(int, input().split())) for _ in range(N)]
xyh.sort(key=lambda i: i[2], reverse=True)
x0, y0, h0 = xyh[0]
for i in range(101):
    for j in range(101):
        H = h0 + abs(i - x0) + abs(j - y0)
        for x, y, h in xyh:
            if h > 0:
                if H != h + abs(i - x) + abs(j - y):
                    break
            else:
                if H - abs(i - x) - abs(j - y) > 0:
                    break
        else:
            print((i, j, H))
            exit()

+xyh.sort(key=lambda i: i[2], reverse=True) +x0, y0, h0 = xyh[0] +        H = h0 + abs(i - x0) + abs(j - y0) -            if h != 0: -                H = h + abs(i - x) + abs(j - y) -                for x, y, h in xyh: -                    if h != max(H - abs(i - x) - abs(j - y), 0): -                        break -                else: -                    print((i, j, H)) -                    exit() +            if h > 0: +                if H != h + abs(i - x) + abs(j - y): +                    break +            else: +                if H - abs(i - x) - abs(j - y) > 0: +                    break +        else: +            print((i, j, H)) +            exit()