n=int(eval(input()))

xyh=[]



x,y,h=-1,-1,-1

nonzero=-1



for i in range(n):

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

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

        nonzero = i



for px in range(101):

    for py in range(101):

        nh = xyh[nonzero][2]+abs(xyh[nonzero][0]-px)+abs(xyh[nonzero][1]-py)

        ok = True



        for nn in range(n):

            if xyh[nn][2] > 0 and nh != xyh[nn][2]+abs(xyh[nn][0]-px) + abs(xyh[nn][1]-py):

                ok=False

            if xyh[nn][2] == 0 and nh > abs(xyh[nn][0]-px) +abs(xyh[nn][1]-py):

                ok=False

        

        if ok:

            x,y,h = px,py,nh

            print((x,y,h))

            exit()
n=int(eval(input()))

a=[]



x,y,k=-1,-1,-1

t=-1

for o in range(n):

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

    if a[o][2] != 0:

        t=o

for i in range(101):

    for j in range(101):

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

        d=True



        for l in range(n):

            if a[l][2] > 0 and h != a[l][2]+abs(a[l][0]-i)+abs(a[l][1]-j):

                d=False

            if a[l][2]==0 and h>abs(a[l][0]-i)+abs(a[l][1]-j):

                d=False

            

        if d:

            x,y,k=i,j,h

            print((x,y,k))

            exit()



n = int(eval(input()))
xyh = []
x, y, h = -1, -1, -1
nonzero = -1
for i in range(n):
    xyh.append(list(map(int, input().split())))
    if xyh[i][2] != 0:
        nonzero = i
for px in range(101):
    for py in range(101):
        nh = xyh[nonzero][2] + abs(xyh[nonzero][0] - px) + abs(xyh[nonzero][1] - py)
        ok = True
        for nn in range(n):
            if xyh[nn][2] > 0 and nh != xyh[nn][2] + abs(xyh[nn][0] - px) + abs(
                xyh[nn][1] - py
            ):
                ok = False
            if xyh[nn][2] == 0 and nh > abs(xyh[nn][0] - px) + abs(xyh[nn][1] - py):
                ok = False
        if ok:
            x, y, h = px, py, nh
            print((x, y, h))
            exit()

n = int(eval(input()))
a = []
x, y, k = -1, -1, -1
t = -1
for o in range(n):
    a.append(list(map(int, input().split())))
    if a[o][2] != 0:
        t = o
for i in range(101):
    for j in range(101):
        h = a[t][2] + abs(a[t][0] - i) + abs(a[t][1] - j)
        d = True
        for l in range(n):
            if a[l][2] > 0 and h != a[l][2] + abs(a[l][0] - i) + abs(a[l][1] - j):
                d = False
            if a[l][2] == 0 and h > abs(a[l][0] - i) + abs(a[l][1] - j):
                d = False
        if d:
            x, y, k = i, j, h
            print((x, y, k))
            exit()

-xyh = [] -x, y, h = -1, -1, -1 -nonzero = -1 -for i in range(n): -    xyh.append(list(map(int, input().split()))) -    if xyh[i][2] != 0: -        nonzero = i -for px in range(101): -    for py in range(101): -        nh = xyh[nonzero][2] + abs(xyh[nonzero][0] - px) + abs(xyh[nonzero][1] - py) -        ok = True -        for nn in range(n): -            if xyh[nn][2] > 0 and nh != xyh[nn][2] + abs(xyh[nn][0] - px) + abs( -                xyh[nn][1] - py -            ): -                ok = False -            if xyh[nn][2] == 0 and nh > abs(xyh[nn][0] - px) + abs(xyh[nn][1] - py): -                ok = False -        if ok: -            x, y, h = px, py, nh -            print((x, y, h)) +a = [] +x, y, k = -1, -1, -1 +t = -1 +for o in range(n): +    a.append(list(map(int, input().split()))) +    if a[o][2] != 0: +        t = o +for i in range(101): +    for j in range(101): +        h = a[t][2] + abs(a[t][0] - i) + abs(a[t][1] - j) +        d = True +        for l in range(n): +            if a[l][2] > 0 and h != a[l][2] + abs(a[l][0] - i) + abs(a[l][1] - j): +                d = False +            if a[l][2] == 0 and h > abs(a[l][0] - i) + abs(a[l][1] - j): +                d = False +        if d: +            x, y, k = i, j, h +            print((x, y, k))