n,*xyh=list(map(int,open(0).read().split()))

x=xyh[0::3]

y=xyh[1::3]

h=xyh[2::3]



for cx in range(101):

    for cy in range(101):

        hmax_i = h.index(max(h))

        H = abs(cx-x[hmax_i]) + abs(cy-y[hmax_i]) + h[hmax_i]

        for i in range(0,n):

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

                if i == n-1:

                    print((cx,cy,H))

                    exit()

                else:

                    continue

            else:

                break
n,*xyh=list(map(int,open(0).read().split()))

x=xyh[0::3]

y=xyh[1::3]

h=xyh[2::3]



hmax_i = h.index(max(h))

for cx in range(101):

    for cy in range(101):

        H = abs(cx-x[hmax_i]) + abs(cy-y[hmax_i]) + h[hmax_i]

        for i in range(0,n):

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

                if i == n-1:

                    print((cx,cy,H))

                    exit()

                else:

                    continue

            else:

                break
n, *xyh = list(map(int, open(0).read().split()))
x = xyh[0::3]
y = xyh[1::3]
h = xyh[2::3]
for cx in range(101):
    for cy in range(101):
        hmax_i = h.index(max(h))
        H = abs(cx - x[hmax_i]) + abs(cy - y[hmax_i]) + h[hmax_i]
        for i in range(0, n):
            if max(H - abs(cx - x[i]) - abs(cy - y[i]), 0) == h[i]:
                if i == n - 1:
                    print((cx, cy, H))
                    exit()
                else:
                    continue
            else:
                break

n, *xyh = list(map(int, open(0).read().split()))
x = xyh[0::3]
y = xyh[1::3]
h = xyh[2::3]
hmax_i = h.index(max(h))
for cx in range(101):
    for cy in range(101):
        H = abs(cx - x[hmax_i]) + abs(cy - y[hmax_i]) + h[hmax_i]
        for i in range(0, n):
            if max(H - abs(cx - x[i]) - abs(cy - y[i]), 0) == h[i]:
                if i == n - 1:
                    print((cx, cy, H))
                    exit()
                else:
                    continue
            else:
                break

+hmax_i = h.index(max(h)) -        hmax_i = h.index(max(h))