n = int(eval(input()))

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



for i in range(n):

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

        h1 = li[i][2]

        break



flag = True

flag2 = False



for i in range(10**9):

    if flag2 == True: break

    for X in range(101):

        for Y in range(101):

            h = h1 + i

            flag = True

            for j in range(n):

                if max(h - abs(li[j][0]-X) - abs(li[j][1]-Y),0) != li[j][2]:

                    flag = False

                    break

            if flag == True:

                print((X,Y,h))

                flag2 = True

            if flag2 == True: break

            h = h1 - i

            flag = True

            for j in range(n):

                if max(h - abs(li[j][0]-X) - abs(li[j][1]-Y),0) != li[j][2]:

                    flag = False

                    break

            if flag == True:

                print((X,Y,h))

                flag2 = True

n = int(eval(input()))

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



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

a,b,c = li[-1]

for x in range(101):

    for y in range(101):

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

        if all(k == max(h-abs(x-i)-abs(y-j),0) for i,j,k in li):

            print((x,y,h))

            exit()

n = int(eval(input()))
li = [list(map(int, input().split())) for i in range(n)]
for i in range(n):
    if li[i][2] != 0:
        h1 = li[i][2]
        break
flag = True
flag2 = False
for i in range(10**9):
    if flag2 == True:
        break
    for X in range(101):
        for Y in range(101):
            h = h1 + i
            flag = True
            for j in range(n):
                if max(h - abs(li[j][0] - X) - abs(li[j][1] - Y), 0) != li[j][2]:
                    flag = False
                    break
            if flag == True:
                print((X, Y, h))
                flag2 = True
            if flag2 == True:
                break
            h = h1 - i
            flag = True
            for j in range(n):
                if max(h - abs(li[j][0] - X) - abs(li[j][1] - Y), 0) != li[j][2]:
                    flag = False
                    break
            if flag == True:
                print((X, Y, h))
                flag2 = True

n = int(eval(input()))
li = [list(map(int, input().split())) for i in range(n)]
li.sort(key=lambda x: x[2])
a, b, c = li[-1]
for x in range(101):
    for y in range(101):
        h = abs(x - a) + abs(y - b) + c
        if all(k == max(h - abs(x - i) - abs(y - j), 0) for i, j, k in li):
            print((x, y, h))
            exit()

-for i in range(n): -    if li[i][2] != 0: -        h1 = li[i][2] -        break -flag = True -flag2 = False -for i in range(10**9): -    if flag2 == True: -        break -    for X in range(101): -        for Y in range(101): -            h = h1 + i -            flag = True -            for j in range(n): -                if max(h - abs(li[j][0] - X) - abs(li[j][1] - Y), 0) != li[j][2]: -                    flag = False -                    break -            if flag == True: -                print((X, Y, h)) -                flag2 = True -            if flag2 == True: -                break -            h = h1 - i -            flag = True -            for j in range(n): -                if max(h - abs(li[j][0] - X) - abs(li[j][1] - Y), 0) != li[j][2]: -                    flag = False -                    break -            if flag == True: -                print((X, Y, h)) -                flag2 = True +li.sort(key=lambda x: x[2]) +a, b, c = li[-1] +for x in range(101): +    for y in range(101): +        h = abs(x - a) + abs(y - b) + c +        if all(k == max(h - abs(x - i) - abs(y - j), 0) for i, j, k in li): +            print((x, y, h)) +            exit()