Buggy python submission (verdict: Runtime Error):
def calc_height(xs, ys, hs, cx, cy):
    ret = -1
    zeros = []
    for i in range(len(xs)):
        x = xs[i]
        y = ys[i]
        h = hs[i]
        if h == 0:
            zeors.append((x,y,h))
            continue
        a = abs(x - cx)
        b = abs(y - cy)
        ch = h + a + b
        if ret == -1:
            ret = ch
        else:
            if ret != ch:
                return -1
    for x, y, h in zeros:
        a = abs(x - cx)
        b = abs(y - cy)
        if ret - a - b > 0:
            return -1
    return ret


def solve(xs, ys, hs):
    for cx in range(101):
        for cy in range(101):
            h = calc_height(xs, ys, hs, cx, cy)
            if h > 0:
                return cx, cy, h


n = int(input())
xs = []
ys = []
hs = []
for i in range(n):
    x, y, h = list(map(int, input().split(' ')))
    xs.append(x)
    ys.append(y)
    hs.append(h)


print(' '.join([str(q) for q in solve(xs, ys, hs)]))

Fixed submission:
def calc_height(xs, ys, hs, cx, cy):
    ret = -1
    zeros = []
    for i in range(len(xs)):
        x = xs[i]
        y = ys[i]
        h = hs[i]
        if h == 0:
            zeros.append((x,y,h))
            continue
        a = abs(x - cx)
        b = abs(y - cy)
        ch = h + a + b
        if ret == -1:
            ret = ch
        else:
            if ret != ch:
                return -1
    for x, y, h in zeros:
        a = abs(x - cx)
        b = abs(y - cy)
        if ret - a - b > 0:
            return -1
    return ret


def solve(xs, ys, hs):
    for cx in range(101):
        for cy in range(101):
            h = calc_height(xs, ys, hs, cx, cy)
            if h > 0:
                return cx, cy, h


n = int(input())
xs = []
ys = []
hs = []
for i in range(n):
    x, y, h = list(map(int, input().split(' ')))
    xs.append(x)
    ys.append(y)
    hs.append(h)


print(' '.join([str(q) for q in solve(xs, ys, hs)]))

Buggy python submission (verdict: Runtime Error):
def calc_height(xs, ys, hs, cx, cy):
    ret = -1
    for i in range(len(xs)):
        x = xs[i]
        y = ys[i]
        h = hs[i]
        a = abs(x - cx)
        b = abs(y - cy)
        ch = h + a + b
        if ret == -1:
            ret = ch
        else:
            if ret != ch:
                return -1
    return ret


def solve(xs, ys, hs):
    for cx in range(101):
        for cy in range(101):
            h = calc_height(xs, ys, hs, cx, cy)
            if h > 0:
                return cx, cy, h


n = int(input())
xs = []
ys = []
hs = []
for i in range(n):
    x, y, h = list(map(int, input().split(' ')))
    xs.append(x)
    ys.append(y)
    hs.append(h)


print(' '.join([str(q) for q in solve(xs, ys, hs)]))

Fixed submission:
def calc_height(xs, ys, hs, cx, cy):
    ret = -1
    zeros = []
    for i in range(len(xs)):
        x = xs[i]
        y = ys[i]
        h = hs[i]
        if h == 0:
            zeros.append((x,y,h))
            continue
        a = abs(x - cx)
        b = abs(y - cy)
        ch = h + a + b
        if ret == -1:
            ret = ch
        else:
            if ret != ch:
                return -1
    for x, y, h in zeros:
        a = abs(x - cx)
        b = abs(y - cy)
        if ret - a - b > 0:
            return -1
    return ret


def solve(xs, ys, hs):
    for cx in range(101):
        for cy in range(101):
            h = calc_height(xs, ys, hs, cx, cy)
            if h > 0:
                return cx, cy, h


n = int(input())
xs = []
ys = []
hs = []
for i in range(n):
    x, y, h = list(map(int, input().split(' ')))
    xs.append(x)
    ys.append(y)
    hs.append(h)


print(' '.join([str(q) for q in solve(xs, ys, hs)]))