def inpl(): return list(map(int, input().split()))



import numpy as np



N = int(eval(input()))

X = np.zeros(N, dtype=np.int64)

Y = np.zeros(N, dtype=np.int64)

H = np.zeros(N, dtype=np.int64)



Q = sorted([inpl() for _ in range(N)], key=lambda x: x[2], reverse=True)



for i, q in enumerate(Q):

    X[i], Y[i], H[i] = q



assert H[0] > 0



for cx in range(101):

    for cy in range(101):

        cH = H[0] + np.abs(X[0] - cx) + np.abs(Y[0] - cy)

        if np.all(H == np.maximum(cH - np.abs(X - cx) - np.abs(Y - cy), 0)):

            print((cx, cy, cH))
from operator import itemgetter

import sys

input = sys.stdin.readline

def inpl(): return list(map(int, input().split()))



N = int(eval(input()))

Q = sorted([inpl() for _ in range(N)], key=itemgetter(2), reverse=True)



for cx in range(101):

    for cy in range(101):

        ch = abs(cx - Q[0][0]) + abs(cy - Q[0][1]) + Q[0][2]

        for x, y, h in Q:

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

                break

        else:

            print((cx, cy, ch))
def inpl():
    return list(map(int, input().split()))


import numpy as np

N = int(eval(input()))
X = np.zeros(N, dtype=np.int64)
Y = np.zeros(N, dtype=np.int64)
H = np.zeros(N, dtype=np.int64)
Q = sorted([inpl() for _ in range(N)], key=lambda x: x[2], reverse=True)
for i, q in enumerate(Q):
    X[i], Y[i], H[i] = q
assert H[0] > 0
for cx in range(101):
    for cy in range(101):
        cH = H[0] + np.abs(X[0] - cx) + np.abs(Y[0] - cy)
        if np.all(H == np.maximum(cH - np.abs(X - cx) - np.abs(Y - cy), 0)):
            print((cx, cy, cH))

from operator import itemgetter
import sys

input = sys.stdin.readline


def inpl():
    return list(map(int, input().split()))


N = int(eval(input()))
Q = sorted([inpl() for _ in range(N)], key=itemgetter(2), reverse=True)
for cx in range(101):
    for cy in range(101):
        ch = abs(cx - Q[0][0]) + abs(cy - Q[0][1]) + Q[0][2]
        for x, y, h in Q:
            if h != max(ch - abs(x - cx) - abs(y - cy), 0):
                break
        else:
            print((cx, cy, ch))

+from operator import itemgetter +import sys + +input = sys.stdin.readline + + -import numpy as np - -X = np.zeros(N, dtype=np.int64) -Y = np.zeros(N, dtype=np.int64) -H = np.zeros(N, dtype=np.int64) -Q = sorted([inpl() for _ in range(N)], key=lambda x: x[2], reverse=True) -for i, q in enumerate(Q): -    X[i], Y[i], H[i] = q -assert H[0] > 0 +Q = sorted([inpl() for _ in range(N)], key=itemgetter(2), reverse=True) -        cH = H[0] + np.abs(X[0] - cx) + np.abs(Y[0] - cy) -        if np.all(H == np.maximum(cH - np.abs(X - cx) - np.abs(Y - cy), 0)): -            print((cx, cy, cH)) +        ch = abs(cx - Q[0][0]) + abs(cy - Q[0][1]) + Q[0][2] +        for x, y, h in Q: +            if h != max(ch - abs(x - cx) - abs(y - cy), 0): +                break +        else: +            print((cx, cy, ch))