Buggy python submission (verdict: Runtime Error):
n = int(input())
x = [0] * n
y = [0] * n
h = [0] * n
for i in range(n):
    x[i], y[i], h[i] = map(int, input().split())

ans = []
for X in range(101):
    for Y in range(101):
        flag = True
        height = []
        for i in range(n):
            height.append(h[i]+abs(x[i]-X)+abs(y[i]-Y))
        for i in range(n):
            if height[i] != height[0]:
                flag = False

        if flag:
            ans.append(X)
            ans.append(Y)
            ans.append(height[0])
            break

print(ans[0], ans[1], ans[2])
            


Fixed submission:
n = int(input())

x = [0] * n
y = [0] * n
h = [0] * n

for i in range(n):
    x[i], y[i], h[i] = map(int, input().split())

for cx in range(101):
    for cy in range(101):
        H = -1
        for i in range(n):
            if h[i] == 0:
                pass
            else:
                tmp = h[i] + abs(x[i]-cx) + abs(y[i]-cy)
                H = tmp
                break
        flag = True
        for i in range(n):
            if h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy),0):
                flag = False
                break
        if flag:
            print(cx,cy,H)

Buggy python submission (verdict: Runtime Error):
n = int(input())
x = [0] * n
y = [0] * n
h = [0] * n
for i in range(n):
    x[i], y[i], h[i] = map(int, input().split())

ans = []
for X in range(101):
    for Y in range(101):
        flag = True
        height = []
        for i in range(n):
            height.append(max(h[i]+abs(x[i]-X)+abs(y[i]-Y),0))
        for i in range(n):
            if height[i] != height[0]:
                flag = False

        if flag:
            ans.append(X)
            ans.append(Y)
            ans.append(height[0])
            break

print(ans[0], ans[1], ans[2])
            


Fixed submission:
n = int(input())

x = [0] * n
y = [0] * n
h = [0] * n

for i in range(n):
    x[i], y[i], h[i] = map(int, input().split())

for cx in range(101):
    for cy in range(101):
        H = -1
        for i in range(n):
            if h[i] == 0:
                pass
            else:
                tmp = h[i] + abs(x[i]-cx) + abs(y[i]-cy)
                H = tmp
                break
        flag = True
        for i in range(n):
            if h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy),0):
                flag = False
                break
        if flag:
            print(cx,cy,H)

Buggy python submission (verdict: Runtime Error):
n = int(input())
x = [0] * n
y = [0] * n
h = [0] * n
for i in range(n):
    x[i], y[i], h[i] = map(int, input().split())

ans = []
for X in range(101):
    for Y in range(101):
        flag = True
        height = []
        for i in range(n):
            height.append(h[i]+abs(x[i]-X)+abs(y[i]-Y))
        for i in range(len(height)):
            if height[i] != height[0]:
                flag = False

        if flag:
            ans.append(X)
            ans.append(Y)
            ans.append(height[0])
            break

print(ans[0], ans[1], ans[2])
            


Fixed submission:
n = int(input())

x = [0] * n
y = [0] * n
h = [0] * n

for i in range(n):
    x[i], y[i], h[i] = map(int, input().split())

for cx in range(101):
    for cy in range(101):
        H = -1
        for i in range(n):
            if h[i] == 0:
                pass
            else:
                tmp = h[i] + abs(x[i]-cx) + abs(y[i]-cy)
                H = tmp
                break
        flag = True
        for i in range(n):
            if h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy),0):
                flag = False
                break
        if flag:
            print(cx,cy,H)