local math_abs = math.abs
local function distance(x1,y1,x2,y2)
    return math_abs(x1 - x2) + math_abs(y1 - y2)
end

local N = io.read("n")

local hints = {}
local hint_nonzero_x, hint_nonzero_y, hint_nonzero_h
for i=1,N do
    local x, y, h = io.read("n", "n", "n")
    hints[i] = {x, y, h}
    if h ~= 0 then
        hint_nonzero_x, hint_nonzero_y, hint_nonzero_h = x, y, h
    end
end

for cx=0,100 do
    for cy=0,100 do
        local h = hint_nonzero_h + distance(cx,cy,hint_nonzero_x,hint_nonzero_y)
        local ok = true
        for i=1,N do
            local hx, hy, hh = table.unpack(hints[i])
            if (h - distance(cx,cy,hx,hy) == hh) or
                (hh == 0 and h - distance(cx,cy,hx,hy) < 0)
            then
            else
                ok = false
                break
            end
        end
        if ok then
            print(table.concat({cx, cy, h}, ' '))
            return
        end
    end
end
    
