N = int(eval(input()))

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

Info_nonzero = []

highest = 0

for x, y, h in Info:

    if h != 0:

        Info_nonzero.append([x, y, h])



for x, y, h in Info:

    if h == 0:

        highest = max(highest, x + y)



for Cx in range(101):

    for Cy in range(101):

        candidate_set = set()

        for x, y, h in Info_nonzero:

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

            candidate_set.add(H)



        ans_H = list(candidate_set)[0]

        if len(candidate_set) == 1:

            for x, y, h in Info:

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

                if h == 0:

                    if not H >= ans_H:

                        break



                if h != 0:

                    if not H <= ans_H:

                        break

            else:

                print((Cx, Cy, abs(Cx - Info_nonzero[0][0]) + abs(Cy - Info_nonzero[0][1]) + Info_nonzero[0][2]))

                exit()

N = int(eval(input()))

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



for Cx in range(101):

    for Cy in range(101):

        H = None

        for x, y, h in Info:

            if h == 0:

                continue



            # hが0以外の情報からHを一意に定める

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

            if (H is None) or (H == tmp_H):

                H = tmp_H

            else:

                break

        # Hが一意に定まっていればh=0の情報すべてと整合性が取れているかチェック

        else:

            for x, y, h in Info:

                if h != 0:

                    continue



                if H - abs(Cx - x) - abs(Cy - y) > 0:

                    break



            # 整合性がとれていれば終わり

            else:

                print((Cx, Cy, H))

                exit()

N = int(eval(input()))
Info = [list(map(int, input().split())) for i in range(N)]
Info_nonzero = []
highest = 0
for x, y, h in Info:
    if h != 0:
        Info_nonzero.append([x, y, h])
for x, y, h in Info:
    if h == 0:
        highest = max(highest, x + y)
for Cx in range(101):
    for Cy in range(101):
        candidate_set = set()
        for x, y, h in Info_nonzero:
            H = abs(Cx - x) + abs(Cy - y) + h
            candidate_set.add(H)
        ans_H = list(candidate_set)[0]
        if len(candidate_set) == 1:
            for x, y, h in Info:
                H = abs(Cx - x) + abs(Cy - y) + h
                if h == 0:
                    if not H >= ans_H:
                        break
                if h != 0:
                    if not H <= ans_H:
                        break
            else:
                print(
                    (
                        Cx,
                        Cy,
                        abs(Cx - Info_nonzero[0][0])
                        + abs(Cy - Info_nonzero[0][1])
                        + Info_nonzero[0][2],
                    )
                )
                exit()

N = int(eval(input()))
Info = [list(map(int, input().split())) for i in range(N)]
for Cx in range(101):
    for Cy in range(101):
        H = None
        for x, y, h in Info:
            if h == 0:
                continue
            # hが0以外の情報からHを一意に定める
            tmp_H = abs(Cx - x) + abs(Cy - y) + h
            if (H is None) or (H == tmp_H):
                H = tmp_H
            else:
                break
        # Hが一意に定まっていればh=0の情報すべてと整合性が取れているかチェック
        else:
            for x, y, h in Info:
                if h != 0:
                    continue
                if H - abs(Cx - x) - abs(Cy - y) > 0:
                    break
            # 整合性がとれていれば終わり
            else:
                print((Cx, Cy, H))
                exit()

-Info_nonzero = [] -highest = 0 -for x, y, h in Info: -    if h != 0: -        Info_nonzero.append([x, y, h]) -for x, y, h in Info: -    if h == 0: -        highest = max(highest, x + y) -        candidate_set = set() -        for x, y, h in Info_nonzero: -            H = abs(Cx - x) + abs(Cy - y) + h -            candidate_set.add(H) -        ans_H = list(candidate_set)[0] -        if len(candidate_set) == 1: +        H = None +        for x, y, h in Info: +            if h == 0: +                continue +            # hが0以外の情報からHを一意に定める +            tmp_H = abs(Cx - x) + abs(Cy - y) + h +            if (H is None) or (H == tmp_H): +                H = tmp_H +            else: +                break +        # Hが一意に定まっていればh=0の情報すべてと整合性が取れているかチェック +        else: -                H = abs(Cx - x) + abs(Cy - y) + h -                if h == 0: -                    if not H >= ans_H: -                        break -                    if not H <= ans_H: -                        break +                    continue +                if H - abs(Cx - x) - abs(Cy - y) > 0: +                    break +            # 整合性がとれていれば終わり -                print( -                    ( -                        Cx, -                        Cy, -                        abs(Cx - Info_nonzero[0][0]) -                        + abs(Cy - Info_nonzero[0][1]) -                        + Info_nonzero[0][2], -                    ) -                ) +                print((Cx, Cy, H))