n = int(eval(input()))

x = [0] * n

y = [0] * n

h = [0] * n

for i in range(n):

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

for a in range(101):

    for b in range(101):

        hset = set()

        for i in range(n):

            if h[i] != 0:

                hset.add(h[i] + abs(x[i]-a) + abs(y[i]-b))

        if len(hset) == 1:

            height = hset.pop()

            check = True

            for i in range(n):

                if h[i] == 0:

                    if height - abs(x[i]-a) - abs(y[i]-b) > 0:

                        check = False

                        break

            if check:

                print((a,b,height))

                exit()

print('ERROR EXIT')

n = int(eval(input()))

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

nonzeroinfo = []

for x, y, h in info:

    if h > 0:

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

zeroinfo = []

for x, y, h in info:

    if h == 0:

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

def checknonzero(x, y, h):

    for a, b, c in nonzeroinfo:

        if h != abs(x-a) + abs(y-b) + c:

            return False

    return True

def checkzero(x, y, h):

    for a, b, _ in zeroinfo:

        if abs(x-a) + abs(y-b) < h:

            return False

    return True

for x in range(101):

    for y in range(101):

        x1, y1, h1 = nonzeroinfo[0]

        h = abs(x-x1) + abs(y-y1) + h1

        ret1 = checknonzero(x, y, h)

        ret2 = checkzero(x, y, h)

        if ret1 and ret2:

            print((x, y, h))

            exit()
n = int(eval(input()))
x = [0] * n
y = [0] * n
h = [0] * n
for i in range(n):
    x[i], y[i], h[i] = list(map(int, input().split()))
for a in range(101):
    for b in range(101):
        hset = set()
        for i in range(n):
            if h[i] != 0:
                hset.add(h[i] + abs(x[i] - a) + abs(y[i] - b))
        if len(hset) == 1:
            height = hset.pop()
            check = True
            for i in range(n):
                if h[i] == 0:
                    if height - abs(x[i] - a) - abs(y[i] - b) > 0:
                        check = False
                        break
            if check:
                print((a, b, height))
                exit()
print("ERROR EXIT")

n = int(eval(input()))
info = [tuple(map(int, input().split())) for _ in range(n)]
nonzeroinfo = []
for x, y, h in info:
    if h > 0:
        nonzeroinfo.append((x, y, h))
zeroinfo = []
for x, y, h in info:
    if h == 0:
        zeroinfo.append((x, y, h))


def checknonzero(x, y, h):
    for a, b, c in nonzeroinfo:
        if h != abs(x - a) + abs(y - b) + c:
            return False
    return True


def checkzero(x, y, h):
    for a, b, _ in zeroinfo:
        if abs(x - a) + abs(y - b) < h:
            return False
    return True


for x in range(101):
    for y in range(101):
        x1, y1, h1 = nonzeroinfo[0]
        h = abs(x - x1) + abs(y - y1) + h1
        ret1 = checknonzero(x, y, h)
        ret2 = checkzero(x, y, h)
        if ret1 and ret2:
            print((x, y, h))
            exit()

-x = [0] * n -y = [0] * n -h = [0] * n -for i in range(n): -    x[i], y[i], h[i] = list(map(int, input().split())) -for a in range(101): -    for b in range(101): -        hset = set() -        for i in range(n): -            if h[i] != 0: -                hset.add(h[i] + abs(x[i] - a) + abs(y[i] - b)) -        if len(hset) == 1: -            height = hset.pop() -            check = True -            for i in range(n): -                if h[i] == 0: -                    if height - abs(x[i] - a) - abs(y[i] - b) > 0: -                        check = False -                        break -            if check: -                print((a, b, height)) -                exit() -print("ERROR EXIT") +info = [tuple(map(int, input().split())) for _ in range(n)] +nonzeroinfo = [] +for x, y, h in info: +    if h > 0: +        nonzeroinfo.append((x, y, h)) +zeroinfo = [] +for x, y, h in info: +    if h == 0: +        zeroinfo.append((x, y, h)) + + +def checknonzero(x, y, h): +    for a, b, c in nonzeroinfo: +        if h != abs(x - a) + abs(y - b) + c: +            return False +    return True + + +def checkzero(x, y, h): +    for a, b, _ in zeroinfo: +        if abs(x - a) + abs(y - b) < h: +            return False +    return True + + +for x in range(101): +    for y in range(101): +        x1, y1, h1 = nonzeroinfo[0] +        h = abs(x - x1) + abs(y - y1) + h1 +        ret1 = checknonzero(x, y, h) +        ret2 = checkzero(x, y, h) +        if ret1 and ret2: +            print((x, y, h)) +            exit()