function input()
  local inp = io.read()
  local r={}
  string.gsub(inp,"(%S+)", function (v) table.insert(r,tonumber(v)) end)
  return r
end

local n = tonumber(io.read())
local x = {}
local y = {}
local h = {}
for i=1,n,1 do
  local arr = input()
  x[i] = arr[1]
  y[i] = arr[2]
  h[i] = arr[3]
end
local cx,cy
local H = 1e9+7
for i=0,100,1 do
  for j=0,100,1 do
    cx=i
    cy=j
    local flag = true
    for k=1,n,1 do
      local dx = math.abs(cx-x[k])
      local dy = math.abs(cy-y[k])
      if h[k]~=0 then
        local Hi = h[k]+dx+dy
        H = Hi
      end
    end
    for k=1,n,1 do
      local dx = math.abs(cx-x[k])
      local dy = math.abs(cy-y[k])
      local Hi = h[k]+dx+dy
      if h[k]==0 then
        if H>Hi then
          flag = false
        end
      else
        if H~=Hi then
          flag = false
        end
      end
    end
    if flag then
      local res = tostring(cx).." "..tostring(cy).." "..tostring(H)
      print(res)
    end
  end
end
    