n=int(eval(input()))

A=[]

for i in range(n):

    A.append(list(map(int,input().split())))



A.sort(key=lambda x:x[2],reverse=True)



#print(A)



a1=0

a2=0

a3=0



for i in range(0,101):

    for j in range(0,101):

        col=0

        h=abs(A[0][0]-i)+abs(A[0][1]-j)+A[0][2]

        for k in range(1,n):

            if max(0,h-abs(A[k][0]-i)-abs(A[k][1]-j))!=A[k][2] :

                col=1

        if col==0 :

            a1=i

            a2=j

            a3=h



print((str(a1)+" "+str(a2)+" "+str(a3)))

n = int(eval(input()))

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



start = 0

while X[start][2] == 0:

    start += 1





def c():

    for i in range(101):

        for j in range(101):

            ng = 0

            h = X[start][2] + abs(i - X[start][0]) + abs(j - X[start][1])

            for k in range(n):

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

                    ng = 1

                    break

            if ng == 0:

                return i, j, h



ans = c()

print((ans[0], ans[1], ans[2]))
n = int(eval(input()))
A = []
for i in range(n):
    A.append(list(map(int, input().split())))
A.sort(key=lambda x: x[2], reverse=True)
# print(A)
a1 = 0
a2 = 0
a3 = 0
for i in range(0, 101):
    for j in range(0, 101):
        col = 0
        h = abs(A[0][0] - i) + abs(A[0][1] - j) + A[0][2]
        for k in range(1, n):
            if max(0, h - abs(A[k][0] - i) - abs(A[k][1] - j)) != A[k][2]:
                col = 1
        if col == 0:
            a1 = i
            a2 = j
            a3 = h
print((str(a1) + " " + str(a2) + " " + str(a3)))

n = int(eval(input()))
X = [list(map(int, input().split())) for i in range(n)]
start = 0
while X[start][2] == 0:
    start += 1


def c():
    for i in range(101):
        for j in range(101):
            ng = 0
            h = X[start][2] + abs(i - X[start][0]) + abs(j - X[start][1])
            for k in range(n):
                if X[k][2] != max(0, h - abs(i - X[k][0]) - abs(j - X[k][1])):
                    ng = 1
                    break
            if ng == 0:
                return i, j, h


ans = c()
print((ans[0], ans[1], ans[2]))

-A = [] -for i in range(n): -    A.append(list(map(int, input().split()))) -A.sort(key=lambda x: x[2], reverse=True) -# print(A) -a1 = 0 -a2 = 0 -a3 = 0 -for i in range(0, 101): -    for j in range(0, 101): -        col = 0 -        h = abs(A[0][0] - i) + abs(A[0][1] - j) + A[0][2] -        for k in range(1, n): -            if max(0, h - abs(A[k][0] - i) - abs(A[k][1] - j)) != A[k][2]: -                col = 1 -        if col == 0: -            a1 = i -            a2 = j -            a3 = h -print((str(a1) + " " + str(a2) + " " + str(a3))) +X = [list(map(int, input().split())) for i in range(n)] +start = 0 +while X[start][2] == 0: +    start += 1 + + +def c(): +    for i in range(101): +        for j in range(101): +            ng = 0 +            h = X[start][2] + abs(i - X[start][0]) + abs(j - X[start][1]) +            for k in range(n): +                if X[k][2] != max(0, h - abs(i - X[k][0]) - abs(j - X[k][1])): +                    ng = 1 +                    break +            if ng == 0: +                return i, j, h + + +ans = c() +print((ans[0], ans[1], ans[2]))