n=int(eval(input()))

l=[[] for i in range(n)]

for i  in range(n):

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

xy=[[] for i in range(101**2)]

k=0

for x in range(101):

    for y in range(101):

        xy[k]=[x,y]

        k+=1

for i in l:

    for j in l:

        tmp=[]

        if i==j:

            continue

        for z in xy:

            if abs(i[0]-z[0])-abs(j[0]-z[0])+abs(i[1]-z[1])-abs(j[1]-z[1])==j[2]-i[2] and i[2]!=0 and j[2]!=0:

                tmp.append(z)

            elif abs(i[0]-z[0])-abs(j[0]-z[0])+abs(i[1]-z[1])-abs(j[1]-z[1])>=j[2]-i[2] and i[2]==0:

                tmp.append(z)

            elif abs(i[0]-z[0])-abs(j[0]-z[0])+abs(i[1]-z[1])-abs(j[1]-z[1])<=j[2]-i[2] and j[2]==0:

                tmp.append(z)

        xy=tmp[:]

        if len(xy)==1:

            break

    if len(xy)==1:

            break

for i in l:

    if i[2]!=0:

        H=i[2]+abs(i[0]-xy[0][0])+abs(i[1]-xy[0][1])

print((xy[0][0],xy[0][1],H))
N=int(eval(input()))

xyh=[]

for i in range(N):

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

xyh.sort(key=lambda x: x[2])



for x in range(101):

    for y in range(101):

        flg = True

        H = xyh[-1][2] + abs(xyh[-1][0] - x) + abs(xyh[-1][1] - y)

        X = x

        Y = y

        

        for i in range(N):

            if xyh[i][2] != max(H - abs(xyh[i][0]-x) - abs(xyh[i][1] - y),0):

                flg=False

                break

        

        if flg:

            break

    if flg:

        break

print((X,Y,H))

    
n = int(eval(input()))
l = [[] for i in range(n)]
for i in range(n):
    l[i] = list(map(int, input().split()))
xy = [[] for i in range(101**2)]
k = 0
for x in range(101):
    for y in range(101):
        xy[k] = [x, y]
        k += 1
for i in l:
    for j in l:
        tmp = []
        if i == j:
            continue
        for z in xy:
            if (
                abs(i[0] - z[0])
                - abs(j[0] - z[0])
                + abs(i[1] - z[1])
                - abs(j[1] - z[1])
                == j[2] - i[2]
                and i[2] != 0
                and j[2] != 0
            ):
                tmp.append(z)
            elif (
                abs(i[0] - z[0])
                - abs(j[0] - z[0])
                + abs(i[1] - z[1])
                - abs(j[1] - z[1])
                >= j[2] - i[2]
                and i[2] == 0
            ):
                tmp.append(z)
            elif (
                abs(i[0] - z[0])
                - abs(j[0] - z[0])
                + abs(i[1] - z[1])
                - abs(j[1] - z[1])
                <= j[2] - i[2]
                and j[2] == 0
            ):
                tmp.append(z)
        xy = tmp[:]
        if len(xy) == 1:
            break
    if len(xy) == 1:
        break
for i in l:
    if i[2] != 0:
        H = i[2] + abs(i[0] - xy[0][0]) + abs(i[1] - xy[0][1])
print((xy[0][0], xy[0][1], H))

N = int(eval(input()))
xyh = []
for i in range(N):
    xyh.append(list(map(int, input().split())))
xyh.sort(key=lambda x: x[2])
for x in range(101):
    for y in range(101):
        flg = True
        H = xyh[-1][2] + abs(xyh[-1][0] - x) + abs(xyh[-1][1] - y)
        X = x
        Y = y
        for i in range(N):
            if xyh[i][2] != max(H - abs(xyh[i][0] - x) - abs(xyh[i][1] - y), 0):
                flg = False
                break
        if flg:
            break
    if flg:
        break
print((X, Y, H))

-n = int(eval(input())) -l = [[] for i in range(n)] -for i in range(n): -    l[i] = list(map(int, input().split())) -xy = [[] for i in range(101**2)] -k = 0 +N = int(eval(input())) +xyh = [] +for i in range(N): +    xyh.append(list(map(int, input().split()))) +xyh.sort(key=lambda x: x[2]) -        xy[k] = [x, y] -        k += 1 -for i in l: -    for j in l: -        tmp = [] -        if i == j: -            continue -        for z in xy: -            if ( -                abs(i[0] - z[0]) -                - abs(j[0] - z[0]) -                + abs(i[1] - z[1]) -                - abs(j[1] - z[1]) -                == j[2] - i[2] -                and i[2] != 0 -                and j[2] != 0 -            ): -                tmp.append(z) -            elif ( -                abs(i[0] - z[0]) -                - abs(j[0] - z[0]) -                + abs(i[1] - z[1]) -                - abs(j[1] - z[1]) -                >= j[2] - i[2] -                and i[2] == 0 -            ): -                tmp.append(z) -            elif ( -                abs(i[0] - z[0]) -                - abs(j[0] - z[0]) -                + abs(i[1] - z[1]) -                - abs(j[1] - z[1]) -                <= j[2] - i[2] -                and j[2] == 0 -            ): -                tmp.append(z) -        xy = tmp[:] -        if len(xy) == 1: +        flg = True +        H = xyh[-1][2] + abs(xyh[-1][0] - x) + abs(xyh[-1][1] - y) +        X = x +        Y = y +        for i in range(N): +            if xyh[i][2] != max(H - abs(xyh[i][0] - x) - abs(xyh[i][1] - y), 0): +                flg = False +                break +        if flg: -    if len(xy) == 1: +    if flg: -for i in l: -    if i[2] != 0: -        H = i[2] + abs(i[0] - xy[0][0]) + abs(i[1] - xy[0][1]) -print((xy[0][0], xy[0][1], H)) +print((X, Y, H))