# coding:utf-8



INF = float('inf')





def inpl(): return list(map(int, input().split()))





def solve():

    for x in range(101):

        for y in range(101):

            for h in range(h_min, h_min + 201):

                for i in range(N):

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

                        break

                else:

                    return x, y, h





if __name__ == '__main__':

    N = int(eval(input()))

    D = []

    for i in range(N):

        x, y, h = inpl()

        D.append([h, x, y])



    h_min = max(D)[0]

    ans = solve()

    print((' '.join(map(str, ans))))

# coding:utf-8



INF = float('inf')





def inpl(): return list(map(int, input().split()))





def solve():

    for cx in range(101):

        for cy in range(101):

            ch = D[0][0] + abs(D[0][1] - cx) + abs(D[0][2] - cy)

            for h, x, y in D:

                if h != max(ch - (abs(x - cx) + abs(y - cy)), 0):

                    break

            else:

                return cx, cy, ch





if __name__ == '__main__':

    N = int(eval(input()))

    D = []

    for i in range(N):

        x, y, h = inpl()

        D.append([h, x, y])

    D.sort()

    D.reverse()

    ans = solve()

    print((' '.join(map(str, ans))))

# coding:utf-8
INF = float("inf")


def inpl():
    return list(map(int, input().split()))


def solve():
    for x in range(101):
        for y in range(101):
            for h in range(h_min, h_min + 201):
                for i in range(N):
                    if D[i][0] != max(h - abs(D[i][1] - x) - abs(D[i][2] - y), 0):
                        break
                else:
                    return x, y, h


if __name__ == "__main__":
    N = int(eval(input()))
    D = []
    for i in range(N):
        x, y, h = inpl()
        D.append([h, x, y])
    h_min = max(D)[0]
    ans = solve()
    print((" ".join(map(str, ans))))

# coding:utf-8
INF = float("inf")


def inpl():
    return list(map(int, input().split()))


def solve():
    for cx in range(101):
        for cy in range(101):
            ch = D[0][0] + abs(D[0][1] - cx) + abs(D[0][2] - cy)
            for h, x, y in D:
                if h != max(ch - (abs(x - cx) + abs(y - cy)), 0):
                    break
            else:
                return cx, cy, ch


if __name__ == "__main__":
    N = int(eval(input()))
    D = []
    for i in range(N):
        x, y, h = inpl()
        D.append([h, x, y])
    D.sort()
    D.reverse()
    ans = solve()
    print((" ".join(map(str, ans))))

-    for x in range(101): -        for y in range(101): -            for h in range(h_min, h_min + 201): -                for i in range(N): -                    if D[i][0] != max(h - abs(D[i][1] - x) - abs(D[i][2] - y), 0): -                        break -                else: -                    return x, y, h +    for cx in range(101): +        for cy in range(101): +            ch = D[0][0] + abs(D[0][1] - cx) + abs(D[0][2] - cy) +            for h, x, y in D: +                if h != max(ch - (abs(x - cx) + abs(y - cy)), 0): +                    break +            else: +                return cx, cy, ch -    h_min = max(D)[0] +    D.sort() +    D.reverse()