def check_h(x, y, xy_):

    difference_h = abs(x-xy_[0]) + abs(y-xy_[1])

    return difference_h



def main():

    n = int(eval(input()))

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



    for x_, y_, h_ in xyh:

        if h_ != 0:

            X, Y, H = x_, y_, h_

            break



    for i in range(101):

        for j in range(101):

            xy = [i, j]

            h = H + check_h(X, Y, xy)

            if h >= H:

                if all(xyh[s][2]==max(h-check_h(xyh[s][0], xyh[s][1], xy), 0) for s in range(n)):

                    print((i, j, h))

                    break

    return 0



if __name__=="__main__":

    main()
def check_h(x, y, xy_):

    difference_h = abs(x-xy_[0]) + abs(y-xy_[1])

    return difference_h



def main():

    n = int(eval(input()))

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

    get_h = [xyh[i][2] for i in range(n)]

    X, Y, H = xyh[get_h.index(max(get_h))]



    for i in range(101):

        for j in range(101):

            xy = [i, j]

            h = H + check_h(X, Y, xy)

            if h >= H:

                if all(xyh[s][2]==max(h-check_h(xyh[s][0], xyh[s][1], xy), 0) for s in range(n)):

                    print((i, j, h))

                    break

    return 0



if __name__=="__main__":

    main()
def check_h(x, y, xy_):
    difference_h = abs(x - xy_[0]) + abs(y - xy_[1])
    return difference_h


def main():
    n = int(eval(input()))
    xyh = [list(map(int, input().split())) for _ in range(n)]
    for x_, y_, h_ in xyh:
        if h_ != 0:
            X, Y, H = x_, y_, h_
            break
    for i in range(101):
        for j in range(101):
            xy = [i, j]
            h = H + check_h(X, Y, xy)
            if h >= H:
                if all(
                    xyh[s][2] == max(h - check_h(xyh[s][0], xyh[s][1], xy), 0)
                    for s in range(n)
                ):
                    print((i, j, h))
                    break
    return 0


if __name__ == "__main__":
    main()

def check_h(x, y, xy_):
    difference_h = abs(x - xy_[0]) + abs(y - xy_[1])
    return difference_h


def main():
    n = int(eval(input()))
    xyh = [list(map(int, input().split())) for _ in range(n)]
    get_h = [xyh[i][2] for i in range(n)]
    X, Y, H = xyh[get_h.index(max(get_h))]
    for i in range(101):
        for j in range(101):
            xy = [i, j]
            h = H + check_h(X, Y, xy)
            if h >= H:
                if all(
                    xyh[s][2] == max(h - check_h(xyh[s][0], xyh[s][1], xy), 0)
                    for s in range(n)
                ):
                    print((i, j, h))
                    break
    return 0


if __name__ == "__main__":
    main()

-    for x_, y_, h_ in xyh: -        if h_ != 0: -            X, Y, H = x_, y_, h_ -            break +    get_h = [xyh[i][2] for i in range(n)] +    X, Y, H = xyh[get_h.index(max(get_h))]