N = int(eval(input()))

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

XYH.sort(key = lambda x:x[2], reverse = 1)

for Cx in range(101):

    for Cy in range(101):

        H = XYH[0][2]+abs(XYH[0][0]-Cx)+abs(XYH[0][1]-Cy)

        cnt = 0

        for X,Y,h in XYH:

            if h == max(H-abs(X-Cx)-abs(Y-Cy),0):

                    cnt += 1

        if cnt == N:

            print((Cx,Cy,H))

            break
N = int(eval(input()))

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

XYH.sort(key = lambda x:x[2], reverse = 1)

mx,my,mh = XYH[0]

for Cx in range(101):

    for Cy in range(101):

        H = mh+abs(mx-Cx)+abs(my-Cy)

        if all(h == max(H-abs(X-Cx)-abs(Y-Cy),0) for X,Y,h in XYH):

            print((Cx,Cy,H))

            break
N = int(eval(input()))
XYH = [list(map(int, input().split())) for i in range(N)]
XYH.sort(key=lambda x: x[2], reverse=1)
for Cx in range(101):
    for Cy in range(101):
        H = XYH[0][2] + abs(XYH[0][0] - Cx) + abs(XYH[0][1] - Cy)
        cnt = 0
        for X, Y, h in XYH:
            if h == max(H - abs(X - Cx) - abs(Y - Cy), 0):
                cnt += 1
        if cnt == N:
            print((Cx, Cy, H))
            break

N = int(eval(input()))
XYH = [list(map(int, input().split())) for i in range(N)]
XYH.sort(key=lambda x: x[2], reverse=1)
mx, my, mh = XYH[0]
for Cx in range(101):
    for Cy in range(101):
        H = mh + abs(mx - Cx) + abs(my - Cy)
        if all(h == max(H - abs(X - Cx) - abs(Y - Cy), 0) for X, Y, h in XYH):
            print((Cx, Cy, H))
            break

+mx, my, mh = XYH[0] -        H = XYH[0][2] + abs(XYH[0][0] - Cx) + abs(XYH[0][1] - Cy) -        cnt = 0 -        for X, Y, h in XYH: -            if h == max(H - abs(X - Cx) - abs(Y - Cy), 0): -                cnt += 1 -        if cnt == N: +        H = mh + abs(mx - Cx) + abs(my - Cy) +        if all(h == max(H - abs(X - Cx) - abs(Y - Cy), 0) for X, Y, h in XYH):