N=int(eval(input()))

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



for Cx in range(101):        # x

    for Cy in range(101):    # y

        flg=True

        k=0

        while xyh[k][2]+abs(xyh[k][0]-Cx)+abs(xyh[k][1]-Cy) <1 or xyh[k][2]<1:

            k+=1

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

        for i in range(len(xyh)):

            if max(H-abs(xyh[i][0]-Cx)-abs(xyh[i][1]-Cy),0)!=xyh[i][2]:

                flg=False

        if flg:

            print((Cx,Cy,H))

            exit()
N = int(eval(input()))



XYH = []

for _ in range(N):

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

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

XYH.sort(key=lambda x: -x[2])



for Cx in range(0, 101):

    for Cy in range(0, 101):

        flg = True



        if XYH[0][2] == 0:

            Ch = 1

        else:

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



        for x, y, h in XYH:

            if h != max(Ch - abs(x-Cx) - abs(y-Cy), 0):

                flg = False



        if flg:

            print((Cx, Cy, Ch))

            exit()

N = int(eval(input()))
xyh = [list(map(int, input().split())) for _ in range(N)]
for Cx in range(101):  # x
    for Cy in range(101):  # y
        flg = True
        k = 0
        while (
            xyh[k][2] + abs(xyh[k][0] - Cx) + abs(xyh[k][1] - Cy) < 1 or xyh[k][2] < 1
        ):
            k += 1
        H = xyh[k][2] + abs(xyh[k][0] - Cx) + abs(xyh[k][1] - Cy)
        for i in range(len(xyh)):
            if max(H - abs(xyh[i][0] - Cx) - abs(xyh[i][1] - Cy), 0) != xyh[i][2]:
                flg = False
        if flg:
            print((Cx, Cy, H))
            exit()

N = int(eval(input()))
XYH = []
for _ in range(N):
    x, y, h = list(map(int, input().split()))
    XYH.append((x, y, h))
XYH.sort(key=lambda x: -x[2])
for Cx in range(0, 101):
    for Cy in range(0, 101):
        flg = True
        if XYH[0][2] == 0:
            Ch = 1
        else:
            Ch = XYH[0][2] + abs(XYH[0][0] - Cx) + abs(XYH[0][1] - Cy)
        for x, y, h in XYH:
            if h != max(Ch - abs(x - Cx) - abs(y - Cy), 0):
                flg = False
        if flg:
            print((Cx, Cy, Ch))
            exit()

-xyh = [list(map(int, input().split())) for _ in range(N)] -for Cx in range(101):  # x -    for Cy in range(101):  # y +XYH = [] +for _ in range(N): +    x, y, h = list(map(int, input().split())) +    XYH.append((x, y, h)) +XYH.sort(key=lambda x: -x[2]) +for Cx in range(0, 101): +    for Cy in range(0, 101): -        k = 0 -        while ( -            xyh[k][2] + abs(xyh[k][0] - Cx) + abs(xyh[k][1] - Cy) < 1 or xyh[k][2] < 1 -        ): -            k += 1 -        H = xyh[k][2] + abs(xyh[k][0] - Cx) + abs(xyh[k][1] - Cy) -        for i in range(len(xyh)): -            if max(H - abs(xyh[i][0] - Cx) - abs(xyh[i][1] - Cy), 0) != xyh[i][2]: +        if XYH[0][2] == 0: +            Ch = 1 +        else: +            Ch = XYH[0][2] + abs(XYH[0][0] - Cx) + abs(XYH[0][1] - Cy) +        for x, y, h in XYH: +            if h != max(Ch - abs(x - Cx) - abs(y - Cy), 0): -            print((Cx, Cy, H)) +            print((Cx, Cy, Ch))