import sys



n = int(eval(input()))

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



for p in range(101):

    for q in range(101):

        for x, y, h in point:

            if h > 0:

                H = h + abs(x-p) + abs(y-q)

                break

        

        for  x, y, h in point:

            if max(H-abs(x-p)-abs(y-q), 0) != h:

                break

        else:

            print((p, q, H))

            sys.exit(0)

import sys



n = int(eval(input()))

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



for d in data:

    if d[2] != 0:

        _x = d[0]

        _y = d[1]

        _h = d[2]



for x in range(101):

    for y in range(101):

        h = _h + abs(_x-x) + abs(_y-y)

        for d in data:

            tmp_x = d[0]

            tmp_y = d[1]

            tmp_h = d[2]

            if tmp_h != max(h - abs(tmp_x-x) - abs(tmp_y-y), 0):

                break

        else:

            print((x, y, h))

            sys.exit(0)

import sys

n = int(eval(input()))
point = [tuple(map(int, input().split())) for i in range(n)]
for p in range(101):
    for q in range(101):
        for x, y, h in point:
            if h > 0:
                H = h + abs(x - p) + abs(y - q)
                break
        for x, y, h in point:
            if max(H - abs(x - p) - abs(y - q), 0) != h:
                break
        else:
            print((p, q, H))
            sys.exit(0)

import sys

n = int(eval(input()))
data = [tuple(map(int, input().split())) for i in range(n)]
for d in data:
    if d[2] != 0:
        _x = d[0]
        _y = d[1]
        _h = d[2]
for x in range(101):
    for y in range(101):
        h = _h + abs(_x - x) + abs(_y - y)
        for d in data:
            tmp_x = d[0]
            tmp_y = d[1]
            tmp_h = d[2]
            if tmp_h != max(h - abs(tmp_x - x) - abs(tmp_y - y), 0):
                break
        else:
            print((x, y, h))
            sys.exit(0)

-point = [tuple(map(int, input().split())) for i in range(n)] -for p in range(101): -    for q in range(101): -        for x, y, h in point: -            if h > 0: -                H = h + abs(x - p) + abs(y - q) -                break -        for x, y, h in point: -            if max(H - abs(x - p) - abs(y - q), 0) != h: +data = [tuple(map(int, input().split())) for i in range(n)] +for d in data: +    if d[2] != 0: +        _x = d[0] +        _y = d[1] +        _h = d[2] +for x in range(101): +    for y in range(101): +        h = _h + abs(_x - x) + abs(_y - y) +        for d in data: +            tmp_x = d[0] +            tmp_y = d[1] +            tmp_h = d[2] +            if tmp_h != max(h - abs(tmp_x - x) - abs(tmp_y - y), 0): -            print((p, q, H)) +            print((x, y, h))