N = int(eval(input()))

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



for x, y, h in l:

    if h == 0:

        continue

    for Cx in range(0, 101):

        for Cy in range(0, 101):

            H = abs(Cx-x) + abs(Cy-y) + h

            if all([hh == max(H - abs(Cx-xx) - abs(Cy-yy), 0) for xx, yy, hh in l]):

                print((Cx, Cy, H))

                exit()
N = int(eval(input()))

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



for x, y, h in l:

    if h == 0:

        continue

    for Cx in range(0, 101):

        for Cy in range(0, 101):

            H = abs(Cx-x) + abs(Cy-y) + h

            if all(hh == max(H - abs(Cx-xx) - abs(Cy-yy), 0) for xx, yy, hh in l):

                print((Cx, Cy, H))

                exit()

                
N = int(eval(input()))
l = [list(map(int, input().split())) for _ in range(N)]
for x, y, h in l:
    if h == 0:
        continue
    for Cx in range(0, 101):
        for Cy in range(0, 101):
            H = abs(Cx - x) + abs(Cy - y) + h
            if all([hh == max(H - abs(Cx - xx) - abs(Cy - yy), 0) for xx, yy, hh in l]):
                print((Cx, Cy, H))
                exit()

N = int(eval(input()))
l = [list(map(int, input().split())) for _ in range(N)]
for x, y, h in l:
    if h == 0:
        continue
    for Cx in range(0, 101):
        for Cy in range(0, 101):
            H = abs(Cx - x) + abs(Cy - y) + h
            if all(hh == max(H - abs(Cx - xx) - abs(Cy - yy), 0) for xx, yy, hh in l):
                print((Cx, Cy, H))
                exit()

-            if all([hh == max(H - abs(Cx - xx) - abs(Cy - yy), 0) for xx, yy, hh in l]): +            if all(hh == max(H - abs(Cx - xx) - abs(Cy - yy), 0) for xx, yy, hh in l):