N=int(eval(input()))



data=[]



for _ in range(N):

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

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

 

def test():

    for cx in range(101):

        for cy in range(101):

            

            for i in range(N):

                if data[i][2]:

                    temph=data[i][2]+abs(data[i][0]-cx)+abs(data[i][1]-cy)

                    flag=True

            

            for d in data:

                if d[2] != max(temph-abs(d[0]-cx)-abs(d[1]-cy),0):

                    flag=False

                    break

                

            if flag:

                print((cx,cy,temph))

                return

            

test()
N=int(eval(input()))



data=[]



for _ in range(N):

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

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

 

def test():

    for cx in range(101):

        for cy in range(101):

            

            for i in range(N):

                if data[i][2]:

                    temph=data[i][2]+abs(data[i][0]-cx)+abs(data[i][1]-cy)

                    flag=True

                    break

            

            for d in data:

                if d[2] != max(temph-abs(d[0]-cx)-abs(d[1]-cy),0):

                    flag=False

                    break

                

            if flag:

                print((cx,cy,temph))

                return

            

test()
N = int(eval(input()))
data = []
for _ in range(N):
    x, y, h = list(map(int, input().split()))
    data.append([x, y, h])


def test():
    for cx in range(101):
        for cy in range(101):
            for i in range(N):
                if data[i][2]:
                    temph = data[i][2] + abs(data[i][0] - cx) + abs(data[i][1] - cy)
                    flag = True
            for d in data:
                if d[2] != max(temph - abs(d[0] - cx) - abs(d[1] - cy), 0):
                    flag = False
                    break
            if flag:
                print((cx, cy, temph))
                return


test()

N = int(eval(input()))
data = []
for _ in range(N):
    x, y, h = list(map(int, input().split()))
    data.append([x, y, h])


def test():
    for cx in range(101):
        for cy in range(101):
            for i in range(N):
                if data[i][2]:
                    temph = data[i][2] + abs(data[i][0] - cx) + abs(data[i][1] - cy)
                    flag = True
                    break
            for d in data:
                if d[2] != max(temph - abs(d[0] - cx) - abs(d[1] - cy), 0):
                    flag = False
                    break
            if flag:
                print((cx, cy, temph))
                return


test()

+                    break