local n=io.read("n")
local x={}
local y={}
local h={}
local a
for i=1,n do
    x[i]=io.read("n")
    y[i]=io.read("n")
    h[i]=io.read("n")
    if h[i]>=1 then
        a=i
    end
end

for i=0,100 do
    for j=0,100 do
        local H=h[a]+math.abs(i-x[a])+math.abs(j-y[a])
        local checker=true
        for k=1,n do
           if h[k]>0 and H-h[k]~=math.abs(i-x[k])+math.abs(j-y[k]) then
            checker=false
           end
           if h[k]==0 and H>math.abs(i-x[k])+math.abs(j-y[k]) then
            checker=false
           end
        end
        if checker then
            print(i,j,H)
            return
        end
    end
end