n=int(eval(input()))

p=[list(map(int,input().split()))for _ in range(n)]

ax,ay,ah=list([x for x in p if x[2]])[0]

for x in range(101):

  for y in range(101):

    H=ah+abs(ax-x)+abs(ay-y)

    if all(max(H-abs(t[0]-x)-abs(t[1]-y),0)==t[2]for t in p):

      print((x,y,H))


n=int(eval(input()));p=eval('list(map(int,input().split())),'*n);x,y,h=[x for x in p if x[2]][0]

for I in range(10201):j,i=I//101,I%101;H=h+abs(x-j)+abs(y-i);print((*(j,i,H)*all(max(H-abs(t[0]-j)-abs(t[1]-i),0)==t[2]for t in p)))
n = int(eval(input()))
p = [list(map(int, input().split())) for _ in range(n)]
ax, ay, ah = list([x for x in p if x[2]])[0]
for x in range(101):
    for y in range(101):
        H = ah + abs(ax - x) + abs(ay - y)
        if all(max(H - abs(t[0] - x) - abs(t[1] - y), 0) == t[2] for t in p):
            print((x, y, H))

n = int(eval(input()))
p = eval("list(map(int,input().split()))," * n)
x, y, h = [x for x in p if x[2]][0]
for I in range(10201):
    j, i = I // 101, I % 101
    H = h + abs(x - j) + abs(y - i)
    print(
        (*(j, i, H) * all(max(H - abs(t[0] - j) - abs(t[1] - i), 0) == t[2] for t in p))
    )

-p = [list(map(int, input().split())) for _ in range(n)] -ax, ay, ah = list([x for x in p if x[2]])[0] -for x in range(101): -    for y in range(101): -        H = ah + abs(ax - x) + abs(ay - y) -        if all(max(H - abs(t[0] - x) - abs(t[1] - y), 0) == t[2] for t in p): -            print((x, y, H)) +p = eval("list(map(int,input().split()))," * n) +x, y, h = [x for x in p if x[2]][0] +for I in range(10201): +    j, i = I // 101, I % 101 +    H = h + abs(x - j) + abs(y - i) +    print( +        (*(j, i, H) * all(max(H - abs(t[0] - j) - abs(t[1] - i), 0) == t[2] for t in p)) +    )