Buggy python submission (verdict: Runtime Error):
N = int(input())
XYH_list = [list(map(int, input().split())) for i in range(N)]

for i in range(0, 101):
    for j in range(0, 101):
        tmpH = 0
        tmpI = i
        tmpJ = j
        for k, xyh in enumerate(XYH_list):
            if k == 0:
                tmpH = xyh[2] + abs(xyh[0] - i) + abs(xyh[1] - j)
                continue
            if xyh[2] == max((tmpH - abs(xyh[0] - i) - abs(xyh[1] - j)), 0):
                if k == N - 1:
                    ans = [str(tmpI), str(tmpJ), str(tmpH)]
                continue
            else:
                break
print(' '.join(ans))

Fixed submission:
N = int(input())
XYH_list = [list(map(int, input().split())) for i in range(N)]
XYH_list = sorted(XYH_list, key=lambda x: x[2], reverse=True)

for xi in range(0, 101):
    for yi in range(0, 101):
        tmpH = 0
        for k in range(N):
            x,y,h = XYH_list[k]
            if k == 0:
                tmpH =h + abs(x - xi) + abs(y - yi)
            if h == max((tmpH - abs(x - xi) - abs(y - yi)), 0):
                if k == N - 1:
                    ans = [str(xi), str(yi), str(tmpH)]
                continue
            else:
                break
print(' '.join(ans))

Buggy python submission (verdict: Runtime Error):
N = int(input())
XYH_list = [list(map(int, input().split())) for i in range(N)]

for i in range(1, 101):
    for j in range(1, 101):
        tmpH = 0
        tmpI = i
        tmpJ = j
        for k, xyh in enumerate(XYH_list):
            if k == 0:
                for l in range(1, 201):
                    if xyh[2] == max((l - abs(xyh[0] - i) - abs(xyh[1] - j)), 0):
                        tmpH = l
                        break
            if xyh[2] == max((tmpH - abs(xyh[0] - i) - abs(xyh[1] - j)), 0):
                if k == N - 1:
                    ans = [str(tmpI), str(tmpJ), str(tmpH)]
                continue
            else:
                break
print(' '.join(ans))


Fixed submission:
N = int(input())
XYH_list = [list(map(int, input().split())) for i in range(N)]
XYH_list = sorted(XYH_list, key=lambda x: x[2], reverse=True)

for xi in range(0, 101):
    for yi in range(0, 101):
        tmpH = 0
        for k in range(N):
            x,y,h = XYH_list[k]
            if k == 0:
                tmpH =h + abs(x - xi) + abs(y - yi)
            if h == max((tmpH - abs(x - xi) - abs(y - yi)), 0):
                if k == N - 1:
                    ans = [str(xi), str(yi), str(tmpH)]
                continue
            else:
                break
print(' '.join(ans))

Buggy python submission (verdict: Runtime Error):
N = int(input())
XYH_list = [list(map(int, input().split())) for i in range(N)]

for i in range(1, 101):
    for j in range(1, 101):
        tmpH = 0
        tmpI = i
        tmpJ = j
        for k, xyh in enumerate(XYH_list):
            if k == 0:
                for l in range(1, 100000):
                    if xyh[2] == max(l - abs(xyh[0] - i) - abs(xyh[1] - j), 0):
                        tmpH = l
                        break
            if xyh[2] == max(tmpH - abs(xyh[0] - i) - abs(xyh[1] - j), 0):
                if k == N - 1:
                    ans = [str(tmpI), str(tmpJ), str(tmpH)]
                continue
            else:
                break
print(' '.join(ans))


Fixed submission:
N = int(input())
XYH_list = [list(map(int, input().split())) for i in range(N)]
XYH_list = sorted(XYH_list, key=lambda x: x[2], reverse=True)

for xi in range(0, 101):
    for yi in range(0, 101):
        tmpH = 0
        for k in range(N):
            x,y,h = XYH_list[k]
            if k == 0:
                tmpH =h + abs(x - xi) + abs(y - yi)
            if h == max((tmpH - abs(x - xi) - abs(y - yi)), 0):
                if k == N - 1:
                    ans = [str(xi), str(yi), str(tmpH)]
                continue
            else:
                break
print(' '.join(ans))