#-*-coding:utf-8-*-



def main():

    n = int(eval(input()))

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

    for i in range(101):

        for j in range(101):

            for arry in arrys:

                x_tmp, y_tmp, h_tmp = arry

                if h_tmp != 0:

                    break

            H = h_tmp + abs(x_tmp - i) + abs(y_tmp - j)

            flag = 1

            for arry in arrys:

                x_t, y_t, h_t = arry

                if h_t == max(H - abs(x_t - i) - abs(y_t - j), 0):

                    flag *= 1

                else:

                    flag *= 0

            if flag == 1:

                print((i, j, H))

                exit()



if __name__ == '__main__':

    main()
#-*-coding:utf-8-*-



def main():

    n = int(eval(input()))

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

    for i in range(101):

        for j in range(101):

            for x_tmp, y_tmp, h_tmp in arrys:

                if h_tmp != 0:

                    break

            H = h_tmp + abs(x_tmp - i) + abs(y_tmp - j)

            for x_t, y_t, h_t in arrys:

                if h_t != max(H - abs(x_t - i) - abs(y_t - j), 0):

                    break

            else:

                print((i, j, H))

                exit()



if __name__ == '__main__':

    main()
# -*-coding:utf-8-*-
def main():
    n = int(eval(input()))
    arrys = [tuple(map(int, input().split())) for _ in range(n)]
    for i in range(101):
        for j in range(101):
            for arry in arrys:
                x_tmp, y_tmp, h_tmp = arry
                if h_tmp != 0:
                    break
            H = h_tmp + abs(x_tmp - i) + abs(y_tmp - j)
            flag = 1
            for arry in arrys:
                x_t, y_t, h_t = arry
                if h_t == max(H - abs(x_t - i) - abs(y_t - j), 0):
                    flag *= 1
                else:
                    flag *= 0
            if flag == 1:
                print((i, j, H))
                exit()


if __name__ == "__main__":
    main()

# -*-coding:utf-8-*-
def main():
    n = int(eval(input()))
    arrys = [tuple(map(int, input().split())) for _ in range(n)]
    for i in range(101):
        for j in range(101):
            for x_tmp, y_tmp, h_tmp in arrys:
                if h_tmp != 0:
                    break
            H = h_tmp + abs(x_tmp - i) + abs(y_tmp - j)
            for x_t, y_t, h_t in arrys:
                if h_t != max(H - abs(x_t - i) - abs(y_t - j), 0):
                    break
            else:
                print((i, j, H))
                exit()


if __name__ == "__main__":
    main()

-            for arry in arrys: -                x_tmp, y_tmp, h_tmp = arry +            for x_tmp, y_tmp, h_tmp in arrys: -            flag = 1 -            for arry in arrys: -                x_t, y_t, h_t = arry -                if h_t == max(H - abs(x_t - i) - abs(y_t - j), 0): -                    flag *= 1 -                else: -                    flag *= 0 -            if flag == 1: +            for x_t, y_t, h_t in arrys: +                if h_t != max(H - abs(x_t - i) - abs(y_t - j), 0): +                    break +            else: