import os,re,sys,operator

from collections import Counter,deque

from operator import itemgetter

from itertools import accumulate,combinations,groupby

from sys import stdin,setrecursionlimit

from copy import deepcopy

setrecursionlimit(10**6)



n=int(eval(input()))

x=sorted([[int(i) for i in input().split()] for _ in range(n)],key=itemgetter(2),reverse=True)

cmpr=x[1:]

for cx in range(101):

    for cy in range(101):

        h=x[0][2]+abs(cx-x[0][0])+abs(cy-x[0][1])

        for i in cmpr:

            nh=max(0,h-abs(i[0]-cx)-abs(i[1]-cy))

            if nh!=i[2]:

                break

        else:

            print((cx,cy,h))

            sys.exit()
#import pysnooper

import os,re,sys,operator,math,heapq,string

#from collections import Counter,deque

#from operator import itemgetter

#from itertools import accumulate,combinations,groupby,combinations_with_replacement

from sys import stdin,setrecursionlimit

#from copy import deepcopy

setrecursionlimit(10**6)

input=stdin.readline



n=int(input().rstrip())

a=sorted([list(map(int,input().rstrip().split())) for _ in range(n)],key=lambda x:-x[2])

c=a[1:]

x,y,h=a[0]

for cx in range(101):

    for cy in range(101):

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

        for i in c:

            nh=max(0,H-abs(i[0]-cx)-abs(i[1]-cy))

            if nh!=i[2]:

                break

        else:

            print((cx,cy,H))

            exit()
import os, re, sys, operator
from collections import Counter, deque
from operator import itemgetter
from itertools import accumulate, combinations, groupby
from sys import stdin, setrecursionlimit
from copy import deepcopy

setrecursionlimit(10**6)
n = int(eval(input()))
x = sorted(
    [[int(i) for i in input().split()] for _ in range(n)],
    key=itemgetter(2),
    reverse=True,
)
cmpr = x[1:]
for cx in range(101):
    for cy in range(101):
        h = x[0][2] + abs(cx - x[0][0]) + abs(cy - x[0][1])
        for i in cmpr:
            nh = max(0, h - abs(i[0] - cx) - abs(i[1] - cy))
            if nh != i[2]:
                break
        else:
            print((cx, cy, h))
            sys.exit()

# import pysnooper
import os, re, sys, operator, math, heapq, string

# from collections import Counter,deque
# from operator import itemgetter
# from itertools import accumulate,combinations,groupby,combinations_with_replacement
from sys import stdin, setrecursionlimit

# from copy import deepcopy
setrecursionlimit(10**6)
input = stdin.readline
n = int(input().rstrip())
a = sorted(
    [list(map(int, input().rstrip().split())) for _ in range(n)], key=lambda x: -x[2]
)
c = a[1:]
x, y, h = a[0]
for cx in range(101):
    for cy in range(101):
        H = h + abs(x - cx) + abs(y - cy)
        for i in c:
            nh = max(0, H - abs(i[0] - cx) - abs(i[1] - cy))
            if nh != i[2]:
                break
        else:
            print((cx, cy, H))
            exit()

-import os, re, sys, operator -from collections import Counter, deque -from operator import itemgetter -from itertools import accumulate, combinations, groupby +# import pysnooper +import os, re, sys, operator, math, heapq, string + +# from collections import Counter,deque +# from operator import itemgetter +# from itertools import accumulate,combinations,groupby,combinations_with_replacement -from copy import deepcopy +# from copy import deepcopy -n = int(eval(input())) -x = sorted( -    [[int(i) for i in input().split()] for _ in range(n)], -    key=itemgetter(2), -    reverse=True, +input = stdin.readline +n = int(input().rstrip()) +a = sorted( +    [list(map(int, input().rstrip().split())) for _ in range(n)], key=lambda x: -x[2] -cmpr = x[1:] +c = a[1:] +x, y, h = a[0] -        h = x[0][2] + abs(cx - x[0][0]) + abs(cy - x[0][1]) -        for i in cmpr: -            nh = max(0, h - abs(i[0] - cx) - abs(i[1] - cy)) +        H = h + abs(x - cx) + abs(y - cy) +        for i in c: +            nh = max(0, H - abs(i[0] - cx) - abs(i[1] - cy)) -            print((cx, cy, h)) -            sys.exit() +            print((cx, cy, H)) +            exit()