N = int(eval(input()))

x, y, h = [], [], []

x2, y2, h2 = [], [], []

for i in range(N):

    xi, yi, hi = list(map(int, input().split()))

    if hi == 0:

        x2.append(xi)

        y2.append(yi)

        h2.append(hi)

    else:

        x.append(xi)

        y.append(yi)

        h.append(hi)





def fn(H, X, Y, Cx, Cy):

    return H + abs(Cx - X) + abs(Cy - Y)



heights = []

for Cx in range(101):

    for Cy in range(101):

        H = fn(h[0], x[0], y[0], Cx, Cy)

        heights.append([H, Cx, Cy])

        if len(h) == 1:

            continue

        flag = True

        for i in range(1, len(h)):

            if H != fn(h[i], x[i], y[i], Cx, Cy):

                flag = False

                break

        if flag:

            print((Cx, Cy, H))

            exit()



print((x[0], y[0], h[0]))
N = int(eval(input()))

x, y, h = [], [], []

x2, y2, h2 = [], [], []

for i in range(N):

    xi, yi, hi = list(map(int, input().split()))

    if hi != 0:

        x.append(xi)

        y.append(yi)

        h.append(hi)





def fn(H, X, Y, Cx, Cy):

    return H + abs(Cx - X) + abs(Cy - Y)



if len(h) == 1:

    print((x[0], y[0], h[0]))

    exit()



for Cx in range(101):

    for Cy in range(101):

        H = fn(h[0], x[0], y[0], Cx, Cy)

        flag = True

        for i in range(1, len(h)):

            if H != fn(h[i], x[i], y[i], Cx, Cy):

                flag = False

                break

        if flag:

            print((Cx, Cy, H))

            exit()





N = int(eval(input()))
x, y, h = [], [], []
x2, y2, h2 = [], [], []
for i in range(N):
    xi, yi, hi = list(map(int, input().split()))
    if hi == 0:
        x2.append(xi)
        y2.append(yi)
        h2.append(hi)
    else:
        x.append(xi)
        y.append(yi)
        h.append(hi)


def fn(H, X, Y, Cx, Cy):
    return H + abs(Cx - X) + abs(Cy - Y)


heights = []
for Cx in range(101):
    for Cy in range(101):
        H = fn(h[0], x[0], y[0], Cx, Cy)
        heights.append([H, Cx, Cy])
        if len(h) == 1:
            continue
        flag = True
        for i in range(1, len(h)):
            if H != fn(h[i], x[i], y[i], Cx, Cy):
                flag = False
                break
        if flag:
            print((Cx, Cy, H))
            exit()
print((x[0], y[0], h[0]))

N = int(eval(input()))
x, y, h = [], [], []
x2, y2, h2 = [], [], []
for i in range(N):
    xi, yi, hi = list(map(int, input().split()))
    if hi != 0:
        x.append(xi)
        y.append(yi)
        h.append(hi)


def fn(H, X, Y, Cx, Cy):
    return H + abs(Cx - X) + abs(Cy - Y)


if len(h) == 1:
    print((x[0], y[0], h[0]))
    exit()
for Cx in range(101):
    for Cy in range(101):
        H = fn(h[0], x[0], y[0], Cx, Cy)
        flag = True
        for i in range(1, len(h)):
            if H != fn(h[i], x[i], y[i], Cx, Cy):
                flag = False
                break
        if flag:
            print((Cx, Cy, H))
            exit()

-    if hi == 0: -        x2.append(xi) -        y2.append(yi) -        h2.append(hi) -    else: +    if hi != 0: -heights = [] +if len(h) == 1: +    print((x[0], y[0], h[0])) +    exit() -        heights.append([H, Cx, Cy]) -        if len(h) == 1: -            continue -print((x[0], y[0], h[0]))