N = int(eval(input()))

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



INF = float('inf')

for cx in range(0,101):

    for cy in range(0,101):

        tmph = None

        maxh = INF

        for x,y,h in src:

            if h > 0:

                tmp = h + abs(x-cx) + abs(y-cy)

                if tmph is None:

                    tmph = tmp

                else:

                    if tmp != tmph:

                        break

                if tmph > maxh:

                    break

            else:

                maxh = min(maxh, abs(x-cx) + abs(y-cy))

                if maxh == 1:

                    tmph = 1

        else:

            for x,y,h in src:

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

                    break

            else:

                print((cx,cy,tmph))

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

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



cands = []

for cx in range(0,101):

    for cy in range(0,101):

        tmph = None

        for x,y,h in src:

            if h == 0: continue

            ch = h + abs(x-cx) + abs(y-cy)

            if ch < 0: break

            if tmph is None:

                tmph = ch

            elif tmph != ch:

                break

        else:

            cands.append((cx,cy,tmph))



for cx,cy,ch in cands:

    for x,y,h in src:

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

    else:

        print((cx,cy,ch))

        exit()
N = int(eval(input()))
src = [tuple(map(int, input().split())) for i in range(N)]
INF = float("inf")
for cx in range(0, 101):
    for cy in range(0, 101):
        tmph = None
        maxh = INF
        for x, y, h in src:
            if h > 0:
                tmp = h + abs(x - cx) + abs(y - cy)
                if tmph is None:
                    tmph = tmp
                else:
                    if tmp != tmph:
                        break
                if tmph > maxh:
                    break
            else:
                maxh = min(maxh, abs(x - cx) + abs(y - cy))
                if maxh == 1:
                    tmph = 1
        else:
            for x, y, h in src:
                if max(tmph - abs(x - cx) - abs(y - cy), 0) != h:
                    break
            else:
                print((cx, cy, tmph))
                exit()

N = int(eval(input()))
src = [tuple(map(int, input().split())) for i in range(N)]
cands = []
for cx in range(0, 101):
    for cy in range(0, 101):
        tmph = None
        for x, y, h in src:
            if h == 0:
                continue
            ch = h + abs(x - cx) + abs(y - cy)
            if ch < 0:
                break
            if tmph is None:
                tmph = ch
            elif tmph != ch:
                break
        else:
            cands.append((cx, cy, tmph))
for cx, cy, ch in cands:
    for x, y, h in src:
        if h != max(ch - abs(x - cx) - abs(y - cy), 0):
            break
    else:
        print((cx, cy, ch))
        exit()

-INF = float("inf") +cands = [] -        maxh = INF -            if h > 0: -                tmp = h + abs(x - cx) + abs(y - cy) -                if tmph is None: -                    tmph = tmp -                else: -                    if tmp != tmph: -                        break -                if tmph > maxh: -                    break -            else: -                maxh = min(maxh, abs(x - cx) + abs(y - cy)) -                if maxh == 1: -                    tmph = 1 +            if h == 0: +                continue +            ch = h + abs(x - cx) + abs(y - cy) +            if ch < 0: +                break +            if tmph is None: +                tmph = ch +            elif tmph != ch: +                break -            for x, y, h in src: -                if max(tmph - abs(x - cx) - abs(y - cy), 0) != h: -                    break -            else: -                print((cx, cy, tmph)) -                exit() +            cands.append((cx, cy, tmph)) +for cx, cy, ch in cands: +    for x, y, h in src: +        if h != max(ch - abs(x - cx) - abs(y - cy), 0): +            break +    else: +        print((cx, cy, ch)) +        exit()