N = int(eval(input()))

G = [list(map(int,input().split())) for k in range(N)]



if N == 1:

    print((G[0][0],G[0][1],G[0][2]))

    exit(0)



G = sorted(G, key=lambda x: -x[2])

for Cx in range(101):

    for Cy in range(101):

        f = 1

        H = G[0][2] + abs(Cx-G[0][0]) + abs(Cy-G[0][1])

        for k in range(1,N):

            if max(0,H-abs(G[k][0]-Cx)-abs(G[k][1]-Cy)) != G[k][2]:

                f = 0

        if f:

            print((Cx,Cy,H))



N = int(eval(input()))

L = [list(map(int, input().split())) for k in range(N)]

m = 0

for l in L:

    m = max(m,l[2])



for x in range(101):

    for y in range(101):

        for h in range(m,m+101):

            f = 1

            for l in L:

                if l[2]!=max(h-abs(l[0]-x)-abs(l[1]-y),0):

                    f = 0

                    break

            if f:

                print((x,y,h))

                exit(0)
N = int(eval(input()))
G = [list(map(int, input().split())) for k in range(N)]
if N == 1:
    print((G[0][0], G[0][1], G[0][2]))
    exit(0)
G = sorted(G, key=lambda x: -x[2])
for Cx in range(101):
    for Cy in range(101):
        f = 1
        H = G[0][2] + abs(Cx - G[0][0]) + abs(Cy - G[0][1])
        for k in range(1, N):
            if max(0, H - abs(G[k][0] - Cx) - abs(G[k][1] - Cy)) != G[k][2]:
                f = 0
        if f:
            print((Cx, Cy, H))

N = int(eval(input()))
L = [list(map(int, input().split())) for k in range(N)]
m = 0
for l in L:
    m = max(m, l[2])
for x in range(101):
    for y in range(101):
        for h in range(m, m + 101):
            f = 1
            for l in L:
                if l[2] != max(h - abs(l[0] - x) - abs(l[1] - y), 0):
                    f = 0
                    break
            if f:
                print((x, y, h))
                exit(0)

-G = [list(map(int, input().split())) for k in range(N)] -if N == 1: -    print((G[0][0], G[0][1], G[0][2])) -    exit(0) -G = sorted(G, key=lambda x: -x[2]) -for Cx in range(101): -    for Cy in range(101): -        f = 1 -        H = G[0][2] + abs(Cx - G[0][0]) + abs(Cy - G[0][1]) -        for k in range(1, N): -            if max(0, H - abs(G[k][0] - Cx) - abs(G[k][1] - Cy)) != G[k][2]: -                f = 0 -        if f: -            print((Cx, Cy, H)) +L = [list(map(int, input().split())) for k in range(N)] +m = 0 +for l in L: +    m = max(m, l[2]) +for x in range(101): +    for y in range(101): +        for h in range(m, m + 101): +            f = 1 +            for l in L: +                if l[2] != max(h - abs(l[0] - x) - abs(l[1] - y), 0): +                    f = 0 +                    break +            if f: +                print((x, y, h)) +                exit(0)