A=abs

_,*p=[list(map(int,t.split()))for t in open(0)]

x,y,h=[t for t in p if t[2]][0]

for I in range(10201):j,i=I//101,I%101;H=h+A(x-j)+A(y-i);print((*(j,i,H)*all(u==max(H-A(s-j)-A(t-i),0)for s,t,u in p)))
A=abs

_,*p=[list(map(int,t.split()))for t in open(0)]

for t in p:

 if t[2]:x,y,h=t

for I in range(10201):j,i=I//101,I%101;H=h+A(x-j)+A(y-i);print((*(j,i,H)*all(u==max(H-A(s-j)-A(t-i),0)for s,t,u in p)))
A = abs
_, *p = [list(map(int, t.split())) for t in open(0)]
x, y, h = [t for t in p if t[2]][0]
for I in range(10201):
    j, i = I // 101, I % 101
    H = h + A(x - j) + A(y - i)
    print((*(j, i, H) * all(u == max(H - A(s - j) - A(t - i), 0) for s, t, u in p)))

A = abs
_, *p = [list(map(int, t.split())) for t in open(0)]
for t in p:
    if t[2]:
        x, y, h = t
for I in range(10201):
    j, i = I // 101, I % 101
    H = h + A(x - j) + A(y - i)
    print((*(j, i, H) * all(u == max(H - A(s - j) - A(t - i), 0) for s, t, u in p)))

-x, y, h = [t for t in p if t[2]][0] +for t in p: +    if t[2]: +        x, y, h = t