N = int(eval(input()))



points = [None] * N

for i in range(0, N):

    points[i] = list(map(int, input().split()))



h_max = max([h for x, y, h in points])



for H in range(h_max + 100, h_max - 1, -1):

    for Cx in range(101):

        for Cy in range(101):

            ok = True

            for X, Y, h1 in points:

                h2 = max(H - abs(X - Cx) - abs(Y - Cy), 0)

                if h1 != h2:

                    ok = False

                    break

            if ok:

                print(('{} {} {}'.format(Cx, Cy, H)))

                exit()

N = int(eval(input()))

points = [[int(s) for s in input().split()] for i in range(N)]

h_max = max(h for x, y, h in points)



for H in range(h_max, h_max + 1000):

    for Cx in range(101):

        for Cy in range(101):

            ok = True

            for x, y, h in points:

                h_calc = max(H - abs(x - Cx) - abs(y - Cy), 0)

                if h != h_calc:

                    ok = False

                    break

            if ok:

                print(('{} {} {}'.format(Cx, Cy, H)))

                exit()

N = int(eval(input()))
points = [None] * N
for i in range(0, N):
    points[i] = list(map(int, input().split()))
h_max = max([h for x, y, h in points])
for H in range(h_max + 100, h_max - 1, -1):
    for Cx in range(101):
        for Cy in range(101):
            ok = True
            for X, Y, h1 in points:
                h2 = max(H - abs(X - Cx) - abs(Y - Cy), 0)
                if h1 != h2:
                    ok = False
                    break
            if ok:
                print(("{} {} {}".format(Cx, Cy, H)))
                exit()

N = int(eval(input()))
points = [[int(s) for s in input().split()] for i in range(N)]
h_max = max(h for x, y, h in points)
for H in range(h_max, h_max + 1000):
    for Cx in range(101):
        for Cy in range(101):
            ok = True
            for x, y, h in points:
                h_calc = max(H - abs(x - Cx) - abs(y - Cy), 0)
                if h != h_calc:
                    ok = False
                    break
            if ok:
                print(("{} {} {}".format(Cx, Cy, H)))
                exit()

-points = [None] * N -for i in range(0, N): -    points[i] = list(map(int, input().split())) -h_max = max([h for x, y, h in points]) -for H in range(h_max + 100, h_max - 1, -1): +points = [[int(s) for s in input().split()] for i in range(N)] +h_max = max(h for x, y, h in points) +for H in range(h_max, h_max + 1000): -            for X, Y, h1 in points: -                h2 = max(H - abs(X - Cx) - abs(Y - Cy), 0) -                if h1 != h2: +            for x, y, h in points: +                h_calc = max(H - abs(x - Cx) - abs(y - Cy), 0) +                if h != h_calc: