Buggy python submission (verdict: Runtime Error):
import sys
n=int(input())

xyh=[[int(l) for l in k] for k in [j.split() for j in [i.strip() for i in sys.stdin.readlines()]]]

#print(xyh)
ef=0

def hgh(c,p):
    return abs(c[0]-p[0])+abs(c[1]-p[1])+p[2]

#ans=[]

for x in range(101):
    if ef:
        break
    for y in range(101):
        th = 0
        for plc in xyh:
            c=1
            if not th:
                if not plc[2]:
                    continue
            h = hgh([x,y],plc)
            if not th:
                th = h
                continue
            if h!=th:
                c=0
                break
        if c:
            ef=1
            ans=[str(s) for s in [x,y,th]]
            break

print(" ".join(ans))



Fixed submission:
import sys
n=int(input())

xyh=[[int(l) for l in k] for k in [j.split() for j in [i.strip() for i in sys.stdin.readlines()]]]
xyh=sorted(xyh, key= lambda x : x[2], reverse=True)
#print(xyh)
ef=0

def hgh(c,p):
    return abs(c[0]-p[0])+abs(c[1]-p[1])+p[2]

#ans=[]

for x in range(101):
    if ef:
        break
    for y in range(101):
        th = -1
        c=1
        for plc in xyh:
            #if not plc[2]:
            #    continue
            h = hgh([x,y],plc)
            #print(x,y,h)
            if th<0:
                th = h
                continue
            if h==th:
                continue
            if  h >= th:
                if not plc[2]:
                    continue
            c=0
            break
        if c:
            ef=1
            ans=[str(s) for s in [x,y,th]]
            break

print(" ".join(ans))

Buggy python submission (verdict: Runtime Error):
import sys
n=int(input())

xyh=[[int(l) for l in k] for k in [j.split() for j in [i.strip() for i in sys.stdin.readlines()]]]

#print(xyh)
ef=0

def hgh(c,p):
    return abs(c[0]-p[0])+abs(c[1]-p[1])+p[2]

#ans=[]

for x in range(101):
    if ef:
        break
    for y in range(101):
        th = 0
        for plc in xyh:
            c=1
            if not th and not plc[2]:
                continue
            h = hgh([x,y],plc)
            if not th:
                th = h
                continue
            if h!=th:
                c=0
                break
        if c:
            ef=1
            ans=[str(s) for s in [x,y,th]]
            break

print(" ".join(ans))



Fixed submission:
import sys
n=int(input())

xyh=[[int(l) for l in k] for k in [j.split() for j in [i.strip() for i in sys.stdin.readlines()]]]
xyh=sorted(xyh, key= lambda x : x[2], reverse=True)
#print(xyh)
ef=0

def hgh(c,p):
    return abs(c[0]-p[0])+abs(c[1]-p[1])+p[2]

#ans=[]

for x in range(101):
    if ef:
        break
    for y in range(101):
        th = -1
        c=1
        for plc in xyh:
            #if not plc[2]:
            #    continue
            h = hgh([x,y],plc)
            #print(x,y,h)
            if th<0:
                th = h
                continue
            if h==th:
                continue
            if  h >= th:
                if not plc[2]:
                    continue
            c=0
            break
        if c:
            ef=1
            ans=[str(s) for s in [x,y,th]]
            break

print(" ".join(ans))