def abs(x1,x2):

    if x1>x2:

        return x1-x2

    else:

        return x2-x1

    

n=int(eval(input()))

x=[]

y=[]

h=[]



for i in range(n):

    xi,yi,hi=list(map(int,input().split()))

    x.append(xi)

    y.append(yi)

    h.append(hi)



hmax=h[0]

xhmax=x[0]

yhmax=y[0]

ihmax=0



for i in range(n):

    if hmax<h[i]:

        hmax=h[i]

        xhmax=x[i]

        yhmax=y[i]

        ihmax=i

    

for cx in range(101):

    for cy in range(101):

        hh=hmax+abs(xhmax,cx)+abs(yhmax,cy)

        yesno="yes"

        for i in range(n):

            if h[i]!=max(hh-abs(x[i],cx)-abs(y[i],cy),0):

                yesno="no"

                break

        if yesno=="yes":

            print((cx,cy,hh))

            break

    if yesno=="yes":

        break


cc=0

if cc==0:

    n=int(eval(input()))

    xyh=[[0]*3 for i in range(n)]

    for i in range(n):

        xyh[i]=list(map(int,input().split()))

        if xyh[i][2]>=1:

            px=xyh[i][0]

            py=xyh[i][1]

            ph=xyh[i][2]

else:

    n=4

    px=3

    py=2

    ph=5

    xyh=[[0]*3 for i in range(n)]

    xyh[0]=[2,3,5]

    xyh[1]=[2,1,5]

    xyh[2]=[1,2,5]

    xyh[3]=[3,2,5]

        

yn=""

for cx in range(102):

    for cy in range(102):

        h=ph+abs(px-cx)+abs(py-cy)

        yn=""

        for i in range(n):

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

                yn="No"

                break

        if yn=="No":

#            print(cx,cy,h,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy))

            continue

        else:

#            print("1:",cx,cy,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy))

            yn="Yes"

            break

#    print("2:",yn,cx,cy,h,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy))

    if yn=="Yes":

        break

    

print((cx,cy,h))

    

    
def abs(x1, x2):
    if x1 > x2:
        return x1 - x2
    else:
        return x2 - x1


n = int(eval(input()))
x = []
y = []
h = []
for i in range(n):
    xi, yi, hi = list(map(int, input().split()))
    x.append(xi)
    y.append(yi)
    h.append(hi)
hmax = h[0]
xhmax = x[0]
yhmax = y[0]
ihmax = 0
for i in range(n):
    if hmax < h[i]:
        hmax = h[i]
        xhmax = x[i]
        yhmax = y[i]
        ihmax = i
for cx in range(101):
    for cy in range(101):
        hh = hmax + abs(xhmax, cx) + abs(yhmax, cy)
        yesno = "yes"
        for i in range(n):
            if h[i] != max(hh - abs(x[i], cx) - abs(y[i], cy), 0):
                yesno = "no"
                break
        if yesno == "yes":
            print((cx, cy, hh))
            break
    if yesno == "yes":
        break

cc = 0
if cc == 0:
    n = int(eval(input()))
    xyh = [[0] * 3 for i in range(n)]
    for i in range(n):
        xyh[i] = list(map(int, input().split()))
        if xyh[i][2] >= 1:
            px = xyh[i][0]
            py = xyh[i][1]
            ph = xyh[i][2]
else:
    n = 4
    px = 3
    py = 2
    ph = 5
    xyh = [[0] * 3 for i in range(n)]
    xyh[0] = [2, 3, 5]
    xyh[1] = [2, 1, 5]
    xyh[2] = [1, 2, 5]
    xyh[3] = [3, 2, 5]
yn = ""
for cx in range(102):
    for cy in range(102):
        h = ph + abs(px - cx) + abs(py - cy)
        yn = ""
        for i in range(n):
            if xyh[i][2] != max(0, h - abs(xyh[i][0] - cx) - abs(xyh[i][1] - cy)):
                yn = "No"
                break
        if yn == "No":
            #            print(cx,cy,h,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy))
            continue
        else:
            #            print("1:",cx,cy,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy))
            yn = "Yes"
            break
    #    print("2:",yn,cx,cy,h,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy))
    if yn == "Yes":
        break
print((cx, cy, h))

-def abs(x1, x2): -    if x1 > x2: -        return x1 - x2 -    else: -        return x2 - x1 - - -n = int(eval(input())) -x = [] -y = [] -h = [] -for i in range(n): -    xi, yi, hi = list(map(int, input().split())) -    x.append(xi) -    y.append(yi) -    h.append(hi) -hmax = h[0] -xhmax = x[0] -yhmax = y[0] -ihmax = 0 -for i in range(n): -    if hmax < h[i]: -        hmax = h[i] -        xhmax = x[i] -        yhmax = y[i] -        ihmax = i -for cx in range(101): -    for cy in range(101): -        hh = hmax + abs(xhmax, cx) + abs(yhmax, cy) -        yesno = "yes" +cc = 0 +if cc == 0: +    n = int(eval(input())) +    xyh = [[0] * 3 for i in range(n)] +    for i in range(n): +        xyh[i] = list(map(int, input().split())) +        if xyh[i][2] >= 1: +            px = xyh[i][0] +            py = xyh[i][1] +            ph = xyh[i][2] +else: +    n = 4 +    px = 3 +    py = 2 +    ph = 5 +    xyh = [[0] * 3 for i in range(n)] +    xyh[0] = [2, 3, 5] +    xyh[1] = [2, 1, 5] +    xyh[2] = [1, 2, 5] +    xyh[3] = [3, 2, 5] +yn = "" +for cx in range(102): +    for cy in range(102): +        h = ph + abs(px - cx) + abs(py - cy) +        yn = "" -            if h[i] != max(hh - abs(x[i], cx) - abs(y[i], cy), 0): -                yesno = "no" +            if xyh[i][2] != max(0, h - abs(xyh[i][0] - cx) - abs(xyh[i][1] - cy)): +                yn = "No" -        if yesno == "yes": -            print((cx, cy, hh)) +        if yn == "No": +            #            print(cx,cy,h,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy)) +            continue +        else: +            #            print("1:",cx,cy,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy)) +            yn = "Yes" -    if yesno == "yes": +    #    print("2:",yn,cx,cy,h,i,xyh[i][2],h-abs(xyh[i][0]-cx)-abs(xyh[i][1]-cy)) +    if yn == "Yes": +print((cx, cy, h))