n = int(eval(input()))

query = []

query0 = []

for i in range(n):

    x, y, h = list(map(int, input().split()))

    if h > 0:

        query.append([x, y, h])

    else:

        query0.append([x, y, h])



for cx in range(101):

    for cy in range(101):

        res = []

        for i in range(len(query)):

            x, y, h = query[i]

            p = abs(x - cx) + abs(y - cy)

            H = h + p

            if h != 0:

                res.append(H)



        if len(set(res)) == 1:

            H = res[0]

            for j in range(len(query0)):

                x0, y0, _ = query0[j]

                if 0 < H - abs(x0 - cx) - abs(y0 - cy):

                    break

            else:

                print((cx, cy, H))

                exit()

import sys



sys.setrecursionlimit(10 ** 7)

input = sys.stdin.readline

f_inf = float('inf')

mod = 10 ** 9 + 7





def resolve():

    n = int(eval(input()))

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



    info = []

    for x, y, h in XYH:

        if h == 0:

            continue

        info.append([x, y, h])



    if len(info) == 1:

        print((*info[0]))

        exit()



    for Cx in range(100 + 1):

        for Cy in range(100 + 1):

            tmp = set()

            for x, y, h in info:

                if h == 0:

                    continue

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

                tmp.add(H)

            if len(tmp) == 1:

                print((Cx, Cy, *list(tmp)))

                exit()





if __name__ == '__main__':

    resolve()

n = int(eval(input()))
query = []
query0 = []
for i in range(n):
    x, y, h = list(map(int, input().split()))
    if h > 0:
        query.append([x, y, h])
    else:
        query0.append([x, y, h])
for cx in range(101):
    for cy in range(101):
        res = []
        for i in range(len(query)):
            x, y, h = query[i]
            p = abs(x - cx) + abs(y - cy)
            H = h + p
            if h != 0:
                res.append(H)
        if len(set(res)) == 1:
            H = res[0]
            for j in range(len(query0)):
                x0, y0, _ = query0[j]
                if 0 < H - abs(x0 - cx) - abs(y0 - cy):
                    break
            else:
                print((cx, cy, H))
                exit()

import sys

sys.setrecursionlimit(10**7)
input = sys.stdin.readline
f_inf = float("inf")
mod = 10**9 + 7


def resolve():
    n = int(eval(input()))
    XYH = [list(map(int, input().split())) for _ in range(n)]
    info = []
    for x, y, h in XYH:
        if h == 0:
            continue
        info.append([x, y, h])
    if len(info) == 1:
        print((*info[0]))
        exit()
    for Cx in range(100 + 1):
        for Cy in range(100 + 1):
            tmp = set()
            for x, y, h in info:
                if h == 0:
                    continue
                H = h + abs(x - Cx) + abs(y - Cy)
                tmp.add(H)
            if len(tmp) == 1:
                print((Cx, Cy, *list(tmp)))
                exit()


if __name__ == "__main__":
    resolve()

-n = int(eval(input())) -query = [] -query0 = [] -for i in range(n): -    x, y, h = list(map(int, input().split())) -    if h > 0: -        query.append([x, y, h]) -    else: -        query0.append([x, y, h]) -for cx in range(101): -    for cy in range(101): -        res = [] -        for i in range(len(query)): -            x, y, h = query[i] -            p = abs(x - cx) + abs(y - cy) -            H = h + p -            if h != 0: -                res.append(H) -        if len(set(res)) == 1: -            H = res[0] -            for j in range(len(query0)): -                x0, y0, _ = query0[j] -                if 0 < H - abs(x0 - cx) - abs(y0 - cy): -                    break -            else: -                print((cx, cy, H)) +import sys + +sys.setrecursionlimit(10**7) +input = sys.stdin.readline +f_inf = float("inf") +mod = 10**9 + 7 + + +def resolve(): +    n = int(eval(input())) +    XYH = [list(map(int, input().split())) for _ in range(n)] +    info = [] +    for x, y, h in XYH: +        if h == 0: +            continue +        info.append([x, y, h]) +    if len(info) == 1: +        print((*info[0])) +        exit() +    for Cx in range(100 + 1): +        for Cy in range(100 + 1): +            tmp = set() +            for x, y, h in info: +                if h == 0: +                    continue +                H = h + abs(x - Cx) + abs(y - Cy) +                tmp.add(H) +            if len(tmp) == 1: +                print((Cx, Cy, *list(tmp))) + + +if __name__ == "__main__": +    resolve()