N = int(eval(input()))

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



for Cx in range(100 + 1):

    for Cy in range(100 + 1):

        flg = True

        H = -1

        max_H = float('inf')

        for x, y, h in XYHs:

            CF = abs(x - Cx) + abs(y - Cy)

            if h == 0:

                max_H = min(max_H, CF)

            else:

                t = h + CF

                if H == -1:

                    H = t

                elif H != t:

                    flg = False

                    break

        if flg and H <= max_H:

            print((Cx, Cy, H))

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

x = []

y = []

h = []



for _ in range(N):

    xx, yy, hh = list(map(int, input().split()))

    x.append(xx)

    y.append(yy)

    h.append(hh)



V_MAX = 100



for cx in range(V_MAX + 1):

    for cy in range(V_MAX + 1):

        # 頂上がどのくらいの高さであって欲しいか

        # -1: 未定, 0以上は確定しているとき

        # -2: 不可能だと分かったとき

        needH = - 1



        for i in range(N):

            if h[i] > 0:

                dist = abs(x[i] - cx) + abs(y[i] - cy)

                # この頂点から見て, 頂上がcx, cyのときに, どの位の高さがあって欲しいか

                tmp = h[i] + dist

                if needH == -1:

                    needH = tmp

                else:

                    if needH != tmp:

                        needH = -2

                        break



        if needH == -2:

            continue # ダメだったら別の場所を探す



        for i in range(N):

            if h[i] == 0:

                dist = abs(x[i] - cx) + abs(y[i] - cy)

                if needH > dist:

                    needH = - 2

                    break



        if needH == -2:

            continue # ダメだったら別の場所を探す



        print((cx, cy, needH))
N = int(eval(input()))
XYHs = [list(map(int, input().split())) for _ in range(N)]
for Cx in range(100 + 1):
    for Cy in range(100 + 1):
        flg = True
        H = -1
        max_H = float("inf")
        for x, y, h in XYHs:
            CF = abs(x - Cx) + abs(y - Cy)
            if h == 0:
                max_H = min(max_H, CF)
            else:
                t = h + CF
                if H == -1:
                    H = t
                elif H != t:
                    flg = False
                    break
        if flg and H <= max_H:
            print((Cx, Cy, H))
            exit()

N = int(eval(input()))
x = []
y = []
h = []
for _ in range(N):
    xx, yy, hh = list(map(int, input().split()))
    x.append(xx)
    y.append(yy)
    h.append(hh)
V_MAX = 100
for cx in range(V_MAX + 1):
    for cy in range(V_MAX + 1):
        # 頂上がどのくらいの高さであって欲しいか
        # -1: 未定, 0以上は確定しているとき
        # -2: 不可能だと分かったとき
        needH = -1
        for i in range(N):
            if h[i] > 0:
                dist = abs(x[i] - cx) + abs(y[i] - cy)
                # この頂点から見て, 頂上がcx, cyのときに, どの位の高さがあって欲しいか
                tmp = h[i] + dist
                if needH == -1:
                    needH = tmp
                else:
                    if needH != tmp:
                        needH = -2
                        break
        if needH == -2:
            continue  # ダメだったら別の場所を探す
        for i in range(N):
            if h[i] == 0:
                dist = abs(x[i] - cx) + abs(y[i] - cy)
                if needH > dist:
                    needH = -2
                    break
        if needH == -2:
            continue  # ダメだったら別の場所を探す
        print((cx, cy, needH))

-XYHs = [list(map(int, input().split())) for _ in range(N)] -for Cx in range(100 + 1): -    for Cy in range(100 + 1): -        flg = True -        H = -1 -        max_H = float("inf") -        for x, y, h in XYHs: -            CF = abs(x - Cx) + abs(y - Cy) -            if h == 0: -                max_H = min(max_H, CF) -            else: -                t = h + CF -                if H == -1: -                    H = t -                elif H != t: -                    flg = False +x = [] +y = [] +h = [] +for _ in range(N): +    xx, yy, hh = list(map(int, input().split())) +    x.append(xx) +    y.append(yy) +    h.append(hh) +V_MAX = 100 +for cx in range(V_MAX + 1): +    for cy in range(V_MAX + 1): +        # 頂上がどのくらいの高さであって欲しいか +        # -1: 未定, 0以上は確定しているとき +        # -2: 不可能だと分かったとき +        needH = -1 +        for i in range(N): +            if h[i] > 0: +                dist = abs(x[i] - cx) + abs(y[i] - cy) +                # この頂点から見て, 頂上がcx, cyのときに, どの位の高さがあって欲しいか +                tmp = h[i] + dist +                if needH == -1: +                    needH = tmp +                else: +                    if needH != tmp: +                        needH = -2 +                        break +        if needH == -2: +            continue  # ダメだったら別の場所を探す +        for i in range(N): +            if h[i] == 0: +                dist = abs(x[i] - cx) + abs(y[i] - cy) +                if needH > dist: +                    needH = -2 -        if flg and H <= max_H: -            print((Cx, Cy, H)) -            exit() +        if needH == -2: +            continue  # ダメだったら別の場所を探す +        print((cx, cy, needH))