import sys



N = int(eval(input()))

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



idx = 0

for i in range(N):

    if xyz[i][2] != 0:

        idx = i

        break



for cx in range(101):

    for cy in range(101):

        switch = 1

        distance = abs(xyz[idx][0] - cx) + abs(xyz[idx][1] - cy)

        H = xyz[idx][2] + distance

        

        for x,y,h in xyz:

            karidis = abs(x - cx) + abs(y - cy)

            if h == 0 and distance <= karidis:

                continue

            kari = h + karidis

            if H != kari:

                switch = 0

                break

        if switch == 1:

            print((cx, cy, H))

            sys.exit()

            
import sys



N = int(eval(input()))

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



idx = 0

for i in range(N):

    if xyz[i][2] != 0:

        idx = i

        break



for cx in range(101):

    for cy in range(101):

        switch = 1

        H = xyz[idx][2] + abs(xyz[idx][0] - cx) + abs(xyz[idx][1] - cy)

        for x,y,h in xyz:

            if h != max(H - abs(x - cx) - abs(y - cy), 0):

                switch = 0

                break

        if switch == 1:

            print((cx, cy, H))

            sys.exit()

            
import sys

N = int(eval(input()))
xyz = [list(map(int, input().split())) for _ in range(N)]
idx = 0
for i in range(N):
    if xyz[i][2] != 0:
        idx = i
        break
for cx in range(101):
    for cy in range(101):
        switch = 1
        distance = abs(xyz[idx][0] - cx) + abs(xyz[idx][1] - cy)
        H = xyz[idx][2] + distance
        for x, y, h in xyz:
            karidis = abs(x - cx) + abs(y - cy)
            if h == 0 and distance <= karidis:
                continue
            kari = h + karidis
            if H != kari:
                switch = 0
                break
        if switch == 1:
            print((cx, cy, H))
            sys.exit()

import sys

N = int(eval(input()))
xyz = [list(map(int, input().split())) for _ in range(N)]
idx = 0
for i in range(N):
    if xyz[i][2] != 0:
        idx = i
        break
for cx in range(101):
    for cy in range(101):
        switch = 1
        H = xyz[idx][2] + abs(xyz[idx][0] - cx) + abs(xyz[idx][1] - cy)
        for x, y, h in xyz:
            if h != max(H - abs(x - cx) - abs(y - cy), 0):
                switch = 0
                break
        if switch == 1:
            print((cx, cy, H))
            sys.exit()

-        distance = abs(xyz[idx][0] - cx) + abs(xyz[idx][1] - cy) -        H = xyz[idx][2] + distance +        H = xyz[idx][2] + abs(xyz[idx][0] - cx) + abs(xyz[idx][1] - cy) -            karidis = abs(x - cx) + abs(y - cy) -            if h == 0 and distance <= karidis: -                continue -            kari = h + karidis -            if H != kari: +            if h != max(H - abs(x - cx) - abs(y - cy), 0):