N = int(eval(input()))

x,y,h = [0]*N,[0]*N,[0]*N



j = -1

for i in range(N):

    x[i],y[i],h[i] = list(map(int,input().split(" ")))

    if h[i] !=  0:

        j = i 

        

H = 1

if j == (-1):

    for cx in range(0,101):

        for cy in range(0,101):

            for i in range(N):

                H = min(H,(abs(x[i]-cx) + abs(y[i]-cy)))



            if H > 0:

                print(("{0} {1} {2}".format(cx,cy,H)))

                exit(0)



for cx in range(0,101):

    for cy in range(0,101):

        H = h[j] + abs(x[j]-cx) + abs(y[j]-cy)

        flg = True

        for i in range(N):

            if (h[i] == 0 and ((abs(x[i]-cx) + abs(y[i]-cy))) < H):

                flg = False

                break

            if (h[i] != 0 and H != (h[i] + abs(x[i]-cx) + abs(y[i]-cy))):

                flg = False

                break

        if flg:

            print(("{0} {1} {2}".format(cx,cy,H)))

            exit(0)

N = int(eval(input()))

x,y,h = [0]*N,[0]*N,[0]*N



j = -1

for i in range(N):

    x[i],y[i],h[i] = list(map(int,input().split(" ")))

    if h[i] !=  0:

        j = i



for cx in range(0,101):

    for cy in range(0,101):

        H = h[j] + abs(x[j]-cx) + abs(y[j]-cy)

        flg = True

        for i in range(N):

            if (h[i] == 0 and ((abs(x[i]-cx) + abs(y[i]-cy))) < H):

                flg = False

                break

            if (h[i] != 0 and H != (h[i] + abs(x[i]-cx) + abs(y[i]-cy))):

                flg = False

                break

        if flg:

            print(("{0} {1} {2}".format(cx,cy,H)))

            exit(0)

N = int(eval(input()))
x, y, h = [0] * N, [0] * N, [0] * N
j = -1
for i in range(N):
    x[i], y[i], h[i] = list(map(int, input().split(" ")))
    if h[i] != 0:
        j = i
H = 1
if j == (-1):
    for cx in range(0, 101):
        for cy in range(0, 101):
            for i in range(N):
                H = min(H, (abs(x[i] - cx) + abs(y[i] - cy)))
            if H > 0:
                print(("{0} {1} {2}".format(cx, cy, H)))
                exit(0)
for cx in range(0, 101):
    for cy in range(0, 101):
        H = h[j] + abs(x[j] - cx) + abs(y[j] - cy)
        flg = True
        for i in range(N):
            if h[i] == 0 and ((abs(x[i] - cx) + abs(y[i] - cy))) < H:
                flg = False
                break
            if h[i] != 0 and H != (h[i] + abs(x[i] - cx) + abs(y[i] - cy)):
                flg = False
                break
        if flg:
            print(("{0} {1} {2}".format(cx, cy, H)))
            exit(0)

N = int(eval(input()))
x, y, h = [0] * N, [0] * N, [0] * N
j = -1
for i in range(N):
    x[i], y[i], h[i] = list(map(int, input().split(" ")))
    if h[i] != 0:
        j = i
for cx in range(0, 101):
    for cy in range(0, 101):
        H = h[j] + abs(x[j] - cx) + abs(y[j] - cy)
        flg = True
        for i in range(N):
            if h[i] == 0 and ((abs(x[i] - cx) + abs(y[i] - cy))) < H:
                flg = False
                break
            if h[i] != 0 and H != (h[i] + abs(x[i] - cx) + abs(y[i] - cy)):
                flg = False
                break
        if flg:
            print(("{0} {1} {2}".format(cx, cy, H)))
            exit(0)

-H = 1 -if j == (-1): -    for cx in range(0, 101): -        for cy in range(0, 101): -            for i in range(N): -                H = min(H, (abs(x[i] - cx) + abs(y[i] - cy))) -            if H > 0: -                print(("{0} {1} {2}".format(cx, cy, H))) -                exit(0)