Buggy python submission (verdict: Runtime Error):
N = int(input())
points = [[int(s) for s in input().split()] for i in range(N)]
points.sort(key=lambda x: x[2])
h_max = points[0][2]

for Cx in range(101):
    for Cy in range(101):
        kouho = set()
        for x, y, h in points:
            if len(kouho) > 1:
                break  # 頂点が一意でない

            if h > 0:
                """観測点の高さが1以上なら頂点高を予測"""
                kouho.add(h + abs(x - Cx) + abs(y - Cy))
            else:
                """観測点の高さが0なら式を満たしているかチェック"""
                if list(kouho)[0] - abs(x - Cx) - abs(y - Cy) != 0:
                    kouho = set()
                    break

        if len(kouho) == 1:
            print('{} {} {}'.format(Cx, Cy, list(kouho)[0]))
            exit()


Fixed submission:
N = int(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()

Buggy python submission (verdict: Runtime Error):
N = int(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 Cx in range(101):
    for Cy in range(101):
        kouho = set()
        for x, y, h in points:
            if len(kouho) > 1:
                break  # 頂点が一意でない

            if h > 0:
                kouho.add(h + abs(x - Cx) + abs(y - Cy))
            else:
                if list(kouho)[0] - abs(x - Cx) - abs(y - Cy) != 0:
                    kouho = set()
                    break

        if len(kouho) == 1:
            print('{} {} {}'.format(Cx, Cy, list(kouho)[0]))
            exit()


Fixed submission:
N = int(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()

Buggy python submission (verdict: Runtime Error):
N = int(input())

points = []
for i in range(0, N):
    xi, yi, hi = map(int, input().split())
    points.append((xi, yi, hi))

cand = {}
for CX in range(101):
    for CY in range(101):
        Hs = set()
        for x, y, h in points:
            H = h + abs(x - CX) + abs(y - CY)
            Hs.add(H)
        if len(Hs) == 1:
            cand[H] = (CX, CY, H)

CX, CY, H = cand[max(cand)]
print('{} {} {}'.format(CX, CY, H))


Fixed submission:
N = int(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()