n = int(eval(input()))

xyh = [list(map(int,input().split())) for _ in [0]*n]

xyh = sorted(xyh,key=lambda x:x[2])

# H-|x-Cx|-|y-Cy| = h



#全探索で良さそう

for i in range(101):

  for j in range(101):

    Cx,Cy=i,j

    #print(Cx,Cy)

    x,y,h = xyh[-1][0],xyh[-1][1],xyh[-1][2]

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

    if all([h==max(H-abs(x-Cx)-abs(y-Cy),0) for x,y,h in xyh]):

      print((Cx,Cy,H))

      exit()

        

        







n = int(eval(input()))

xyh = [list(map(int,input().split())) for _ in [0]*n]

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

x0,y0,h0 = xyh[-1][0],xyh[-1][1],xyh[-1][2]



#全探索で良さそう

for Cx in range(101):

  for Cy in range(101):

    # H-|x-Cx|-|y-Cy| = h

    H = h0 + abs(x0-Cx) + abs(y0-Cy)

    tf = True

    for k in range(n-1):

      x,y,h = xyh[k][0], xyh[k][1], xyh[k][2]

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

        tf = False

        break

    if tf == True and H >=1:

      print((Cx,Cy,H))

      exit()

n = int(eval(input()))
xyh = [list(map(int, input().split())) for _ in [0] * n]
xyh = sorted(xyh, key=lambda x: x[2])
# H-|x-Cx|-|y-Cy| = h
# 全探索で良さそう
for i in range(101):
    for j in range(101):
        Cx, Cy = i, j
        # print(Cx,Cy)
        x, y, h = xyh[-1][0], xyh[-1][1], xyh[-1][2]
        H = max(h + abs(x - Cx) + abs(y - Cy), 0)
        if all([h == max(H - abs(x - Cx) - abs(y - Cy), 0) for x, y, h in xyh]):
            print((Cx, Cy, H))
            exit()

n = int(eval(input()))
xyh = [list(map(int, input().split())) for _ in [0] * n]
xyh.sort(key=lambda x: x[2])
x0, y0, h0 = xyh[-1][0], xyh[-1][1], xyh[-1][2]
# 全探索で良さそう
for Cx in range(101):
    for Cy in range(101):
        # H-|x-Cx|-|y-Cy| = h
        H = h0 + abs(x0 - Cx) + abs(y0 - Cy)
        tf = True
        for k in range(n - 1):
            x, y, h = xyh[k][0], xyh[k][1], xyh[k][2]
            if h != max(H - abs(x - Cx) - abs(y - Cy), 0):
                tf = False
                break
        if tf == True and H >= 1:
            print((Cx, Cy, H))
            exit()

-xyh = sorted(xyh, key=lambda x: x[2]) -# H-|x-Cx|-|y-Cy| = h +xyh.sort(key=lambda x: x[2]) +x0, y0, h0 = xyh[-1][0], xyh[-1][1], xyh[-1][2] -for i in range(101): -    for j in range(101): -        Cx, Cy = i, j -        # print(Cx,Cy) -        x, y, h = xyh[-1][0], xyh[-1][1], xyh[-1][2] -        H = max(h + abs(x - Cx) + abs(y - Cy), 0) -        if all([h == max(H - abs(x - Cx) - abs(y - Cy), 0) for x, y, h in xyh]): +for Cx in range(101): +    for Cy in range(101): +        # H-|x-Cx|-|y-Cy| = h +        H = h0 + abs(x0 - Cx) + abs(y0 - Cy) +        tf = True +        for k in range(n - 1): +            x, y, h = xyh[k][0], xyh[k][1], xyh[k][2] +            if h != max(H - abs(x - Cx) - abs(y - Cy), 0): +                tf = False +                break +        if tf == True and H >= 1: