n = int(eval(input()))

data = [list(map(int, input().split())) for i in range(n)]



flag = 0

for i in range(n):

    if data[i][2] > 0:

        flag = 1

        break



if flag == 0:

    print((data[0][0], data[0][1], 0))

else:

    for cx in range(0, 101):

        for cy in range(0, 101):

            for i in range(n):

                if data[i][2] > 0:

                    H = abs(data[i][0]-cx) + abs(data[i][1]-cy) + data[i][2]

            check = 0

            for i in range(n):

                if data[i][2] != max(0, H - abs(data[i][0]-cx) - abs(data[i][1]-cy)):

                    check = 1

            if check == 0:

                print((cx, cy, H))

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

x = []

y = []

h = []

for i in range(n):

    X, Y, H = list(map(int, input().split()))

    x.append(X)

    y.append(Y)

    h.append(H)



INF = float('inf')

for cx in range(101):

    for cy in range(101):

        H = INF

        Hmax = INF

        for i in range(n):

            if h[i] > 0 and H == INF:

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

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

                break

            elif h[i] == 0:

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

        else:

            if H <= Hmax:

                print((cx, cy, H))

                exit()

            elif H == INF and Hmax == 1:

                print((cx, cy, 1))

                exit()
n = int(eval(input()))
data = [list(map(int, input().split())) for i in range(n)]
flag = 0
for i in range(n):
    if data[i][2] > 0:
        flag = 1
        break
if flag == 0:
    print((data[0][0], data[0][1], 0))
else:
    for cx in range(0, 101):
        for cy in range(0, 101):
            for i in range(n):
                if data[i][2] > 0:
                    H = abs(data[i][0] - cx) + abs(data[i][1] - cy) + data[i][2]
            check = 0
            for i in range(n):
                if data[i][2] != max(
                    0, H - abs(data[i][0] - cx) - abs(data[i][1] - cy)
                ):
                    check = 1
            if check == 0:
                print((cx, cy, H))
                exit()

n = int(eval(input()))
x = []
y = []
h = []
for i in range(n):
    X, Y, H = list(map(int, input().split()))
    x.append(X)
    y.append(Y)
    h.append(H)
INF = float("inf")
for cx in range(101):
    for cy in range(101):
        H = INF
        Hmax = INF
        for i in range(n):
            if h[i] > 0 and H == INF:
                H = h[i] + abs(x[i] - cx) + abs(y[i] - cy)
            elif h[i] > 0 and H != h[i] + abs(x[i] - cx) + abs(y[i] - cy):
                break
            elif h[i] == 0:
                Hmax = min(Hmax, abs(x[i] - cx) + abs(y[i] - cy))
        else:
            if H <= Hmax:
                print((cx, cy, H))
                exit()
            elif H == INF and Hmax == 1:
                print((cx, cy, 1))
                exit()

-data = [list(map(int, input().split())) for i in range(n)] -flag = 0 +x = [] +y = [] +h = [] -    if data[i][2] > 0: -        flag = 1 -        break -if flag == 0: -    print((data[0][0], data[0][1], 0)) -else: -    for cx in range(0, 101): -        for cy in range(0, 101): -            for i in range(n): -                if data[i][2] > 0: -                    H = abs(data[i][0] - cx) + abs(data[i][1] - cy) + data[i][2] -            check = 0 -            for i in range(n): -                if data[i][2] != max( -                    0, H - abs(data[i][0] - cx) - abs(data[i][1] - cy) -                ): -                    check = 1 -            if check == 0: +    X, Y, H = list(map(int, input().split())) +    x.append(X) +    y.append(Y) +    h.append(H) +INF = float("inf") +for cx in range(101): +    for cy in range(101): +        H = INF +        Hmax = INF +        for i in range(n): +            if h[i] > 0 and H == INF: +                H = h[i] + abs(x[i] - cx) + abs(y[i] - cy) +            elif h[i] > 0 and H != h[i] + abs(x[i] - cx) + abs(y[i] - cy): +                break +            elif h[i] == 0: +                Hmax = min(Hmax, abs(x[i] - cx) + abs(y[i] - cy)) +        else: +            if H <= Hmax: +            elif H == INF and Hmax == 1: +                print((cx, cy, 1)) +                exit()