from math import *



N = int(eval(input()))

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

x, y, h = [all_input_list[i] for i in range(N) if all_input_list[i][2] > 0][0]

for cx in range(101):

    for cy in range(101):

        H = h + abs(cx - x) + abs(cy - y)

        for input_list in all_input_list:

            if (input_list[2] != max(H - abs(cx - input_list[0]) - abs(cy - input_list[1]), 0)):

                break

        else:

            print(("%s %s %s" % (cx, cy, H)))

            exit()

from math import *

import sys



N = int(eval(input()))

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

x, y, h = sorted(all_input_list, key=lambda x: x[2])[-1]

for cx in range(101):

    for cy in range(101):

        H = h + abs(cx - x) + abs(cy - y)

        for input_list in all_input_list:

            if (input_list[2] != max(H - abs(cx - input_list[0]) - abs(cy - input_list[1]), 0)):

                break

        else:

            print(("%s %s %s" % (cx, cy, H)))

            sys.exit(0)
from math import *

N = int(eval(input()))
all_input_list = [list(map(int, input().split())) for i in range(N)]
x, y, h = [all_input_list[i] for i in range(N) if all_input_list[i][2] > 0][0]
for cx in range(101):
    for cy in range(101):
        H = h + abs(cx - x) + abs(cy - y)
        for input_list in all_input_list:
            if input_list[2] != max(
                H - abs(cx - input_list[0]) - abs(cy - input_list[1]), 0
            ):
                break
        else:
            print(("%s %s %s" % (cx, cy, H)))
            exit()

from math import *
import sys

N = int(eval(input()))
all_input_list = [list(map(int, input().split())) for i in range(N)]
x, y, h = sorted(all_input_list, key=lambda x: x[2])[-1]
for cx in range(101):
    for cy in range(101):
        H = h + abs(cx - x) + abs(cy - y)
        for input_list in all_input_list:
            if input_list[2] != max(
                H - abs(cx - input_list[0]) - abs(cy - input_list[1]), 0
            ):
                break
        else:
            print(("%s %s %s" % (cx, cy, H)))
            sys.exit(0)

+import sys -x, y, h = [all_input_list[i] for i in range(N) if all_input_list[i][2] > 0][0] +x, y, h = sorted(all_input_list, key=lambda x: x[2])[-1] -            exit() +            sys.exit(0)