from sys import stdin

n = int(stdin.readline().rstrip())

li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]

point = 0

for i in range(101):

    for j in range(101):

        flag = True

        kizyun = False

        count = 0

        for a,b,c in li:

            if c != 0:

                count += 1

                if kizyun == False:

                    h = c+abs(a-i)+abs(b-j)

                    ha = a

                    hb = b

                    hc = c

                    kizyun = True

                else:

                    k = c+abs(a-i)+abs(b-j)

                    if h != k:

                        flag = False

        if count == 1:

            print((ha,hb,hc))

            exit()

        if flag == True:

            point += 1

            print((i,j,h))
n = int(eval(input()))

low = 0

hi = 10**9



li = []

lin = []



for _ in range(n):

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

    if h != 0:

        li.append((x,y,h))

    lin.append((x,y,h))



for i in range(101):

    for j in range(101):

        flag = True

        h = li[0][2]+abs(i-li[0][0])+abs(j-li[0][1])

        for a,b,c in lin:

            if max(h-abs(i-a)-abs(j-b),0) != c:

                flag = False

                break

        if flag:

            print((i,j,h))

            exit()
from sys import stdin

n = int(stdin.readline().rstrip())
li = [list(map(int, stdin.readline().rstrip().split())) for _ in range(n)]
point = 0
for i in range(101):
    for j in range(101):
        flag = True
        kizyun = False
        count = 0
        for a, b, c in li:
            if c != 0:
                count += 1
                if kizyun == False:
                    h = c + abs(a - i) + abs(b - j)
                    ha = a
                    hb = b
                    hc = c
                    kizyun = True
                else:
                    k = c + abs(a - i) + abs(b - j)
                    if h != k:
                        flag = False
        if count == 1:
            print((ha, hb, hc))
            exit()
        if flag == True:
            point += 1
            print((i, j, h))

n = int(eval(input()))
low = 0
hi = 10**9
li = []
lin = []
for _ in range(n):
    x, y, h = list(map(int, input().split()))
    if h != 0:
        li.append((x, y, h))
    lin.append((x, y, h))
for i in range(101):
    for j in range(101):
        flag = True
        h = li[0][2] + abs(i - li[0][0]) + abs(j - li[0][1])
        for a, b, c in lin:
            if max(h - abs(i - a) - abs(j - b), 0) != c:
                flag = False
                break
        if flag:
            print((i, j, h))
            exit()

-from sys import stdin - -n = int(stdin.readline().rstrip()) -li = [list(map(int, stdin.readline().rstrip().split())) for _ in range(n)] -point = 0 +n = int(eval(input())) +low = 0 +hi = 10**9 +li = [] +lin = [] +for _ in range(n): +    x, y, h = list(map(int, input().split())) +    if h != 0: +        li.append((x, y, h)) +    lin.append((x, y, h)) -        kizyun = False -        count = 0 -        for a, b, c in li: -            if c != 0: -                count += 1 -                if kizyun == False: -                    h = c + abs(a - i) + abs(b - j) -                    ha = a -                    hb = b -                    hc = c -                    kizyun = True -                else: -                    k = c + abs(a - i) + abs(b - j) -                    if h != k: -                        flag = False -        if count == 1: -            print((ha, hb, hc)) +        h = li[0][2] + abs(i - li[0][0]) + abs(j - li[0][1]) +        for a, b, c in lin: +            if max(h - abs(i - a) - abs(j - b), 0) != c: +                flag = False +                break +        if flag: +            print((i, j, h)) -        if flag == True: -            point += 1 -            print((i, j, h))