from collections import Counter



n = int(eval(input()))



xyh = []

for i in range(n):

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



for i in range(n): # 高さが0でない情報を探す

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

        xyh_1 = xyh[i]

        break



for cx in range(101): #Cx 0~100

    for cy in range(101): #Cy 0~100

        h = abs(xyh_1[0] - cx) + abs(xyh_1[1] - cy) + xyh_1[2] # 高さHを求める



        flag = 0

        for i in range(n):

             # 高さHが適切であるか確認

            if xyh[i][2] == max(h - abs(xyh[i][0] - cx) - abs(xyh[i][1] - cy), 0):

                flag += 1



        if flag == n:

            print((cx, cy, h))

n = int(eval(input()))



xyh = []

for i in range(n):

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



#高さが0でない情報を探す

for i in range(n):

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

        x_ex, y_ex, h_ex = xyh[i]

        break



for cx in range(101): #Cx 0~100

    for cy in range(101): #Cy 0~100

        h = abs(x_ex - cx) + abs(y_ex - cy) + h_ex #高さHを求める



        #先程出した高さHが他の例にも当てはまるか確認

        flag = 0

        for i in range(n):

            x_i, y_i, h_i = xyh[i]

            if h_i == max(h - abs(x_i - cx) - abs(y_i - cy), 0):

                flag += 1

            else:

                break



        if flag == n:

            print((cx, cy, h))

from collections import Counter

n = int(eval(input()))
xyh = []
for i in range(n):
    xyh.append(list(map(int, input().split())))
for i in range(n):  # 高さが0でない情報を探す
    if xyh[i][2] != 0:
        xyh_1 = xyh[i]
        break
for cx in range(101):  # Cx 0~100
    for cy in range(101):  # Cy 0~100
        h = abs(xyh_1[0] - cx) + abs(xyh_1[1] - cy) + xyh_1[2]  # 高さHを求める
        flag = 0
        for i in range(n):
            # 高さHが適切であるか確認
            if xyh[i][2] == max(h - abs(xyh[i][0] - cx) - abs(xyh[i][1] - cy), 0):
                flag += 1
        if flag == n:
            print((cx, cy, h))

n = int(eval(input()))
xyh = []
for i in range(n):
    xyh.append(list(map(int, input().split())))
# 高さが0でない情報を探す
for i in range(n):
    if xyh[i][2] != 0:
        x_ex, y_ex, h_ex = xyh[i]
        break
for cx in range(101):  # Cx 0~100
    for cy in range(101):  # Cy 0~100
        h = abs(x_ex - cx) + abs(y_ex - cy) + h_ex  # 高さHを求める
        # 先程出した高さHが他の例にも当てはまるか確認
        flag = 0
        for i in range(n):
            x_i, y_i, h_i = xyh[i]
            if h_i == max(h - abs(x_i - cx) - abs(y_i - cy), 0):
                flag += 1
            else:
                break
        if flag == n:
            print((cx, cy, h))

-from collections import Counter - -for i in range(n):  # 高さが0でない情報を探す +# 高さが0でない情報を探す +for i in range(n): -        xyh_1 = xyh[i] +        x_ex, y_ex, h_ex = xyh[i] -        h = abs(xyh_1[0] - cx) + abs(xyh_1[1] - cy) + xyh_1[2]  # 高さHを求める +        h = abs(x_ex - cx) + abs(y_ex - cy) + h_ex  # 高さHを求める +        # 先程出した高さHが他の例にも当てはまるか確認 -            # 高さHが適切であるか確認 -            if xyh[i][2] == max(h - abs(xyh[i][0] - cx) - abs(xyh[i][1] - cy), 0): +            x_i, y_i, h_i = xyh[i] +            if h_i == max(h - abs(x_i - cx) - abs(y_i - cy), 0): +            else: +                break