n=int(eval(input()))

x,y,h=list(map(int,input().split()))

d=set([(x,y,h)])

t=[x,y,h]

for i in range(n-1):

    x,y,h=list(map(int,input().split()))

    d.add((x,y,h))

    if t[2]==0: t=[x,y,h]



for i in range(101):

    for j in range(101):

        f=0

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

        for k in d:

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

            if k[2]==0 and abs(k[0]-i)+abs(k[1]-j)+k[2]<p: f=1

        if f==0:

            print((i,j,p))

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

d=[]

for i in range(n):

    a,b,c=list(map(int,input().split()))

    d.append((a,b,c))

    if c!=0:

        x=a

        y=b

        h=c



for i in range(101):

    for j in range(101):

        p=abs(i-x)+abs(j-y)+h

        for a,b,c in d:

            if (c==0 and p-abs(i-a)-abs(j-b)<1) or (c==(p-abs(i-a)-abs(j-b))):

                pass

            else:

                p=-1

                break

        if p!=-1:

            print((i,j,p))

            exit()

n = int(eval(input()))
x, y, h = list(map(int, input().split()))
d = set([(x, y, h)])
t = [x, y, h]
for i in range(n - 1):
    x, y, h = list(map(int, input().split()))
    d.add((x, y, h))
    if t[2] == 0:
        t = [x, y, h]
for i in range(101):
    for j in range(101):
        f = 0
        p = abs(t[0] - i) + abs(t[1] - j) + t[2]
        for k in d:
            if k[2] != 0 and abs(k[0] - i) + abs(k[1] - j) + k[2] != p:
                f = 1
            if k[2] == 0 and abs(k[0] - i) + abs(k[1] - j) + k[2] < p:
                f = 1
        if f == 0:
            print((i, j, p))
            exit()

n = int(eval(input()))
d = []
for i in range(n):
    a, b, c = list(map(int, input().split()))
    d.append((a, b, c))
    if c != 0:
        x = a
        y = b
        h = c
for i in range(101):
    for j in range(101):
        p = abs(i - x) + abs(j - y) + h
        for a, b, c in d:
            if (c == 0 and p - abs(i - a) - abs(j - b) < 1) or (
                c == (p - abs(i - a) - abs(j - b))
            ):
                pass
            else:
                p = -1
                break
        if p != -1:
            print((i, j, p))
            exit()

-x, y, h = list(map(int, input().split())) -d = set([(x, y, h)]) -t = [x, y, h] -for i in range(n - 1): -    x, y, h = list(map(int, input().split())) -    d.add((x, y, h)) -    if t[2] == 0: -        t = [x, y, h] +d = [] +for i in range(n): +    a, b, c = list(map(int, input().split())) +    d.append((a, b, c)) +    if c != 0: +        x = a +        y = b +        h = c -        f = 0 -        p = abs(t[0] - i) + abs(t[1] - j) + t[2] -        for k in d: -            if k[2] != 0 and abs(k[0] - i) + abs(k[1] - j) + k[2] != p: -                f = 1 -            if k[2] == 0 and abs(k[0] - i) + abs(k[1] - j) + k[2] < p: -                f = 1 -        if f == 0: +        p = abs(i - x) + abs(j - y) + h +        for a, b, c in d: +            if (c == 0 and p - abs(i - a) - abs(j - b) < 1) or ( +                c == (p - abs(i - a) - abs(j - b)) +            ): +                pass +            else: +                p = -1 +                break +        if p != -1: