local mmi, mma = math.min, math.max
local mab = math.abs
local n = io.read("*n")
local x, y, h = {}, {}, {}
local iref = 0
for i = 1, n do
  x[i], y[i], h[i] = io.read("*n", "*n", "*n")
  if 0 < h[i] then iref = i end
end
for xi = 0, 100 do
  for yi = 0, 100 do
    local hi = mab(xi - x[iref]) + mab(yi - y[iref]) + h[iref]
    local v = true
    for i = 1, n do
      if mma(0, hi - mab(xi - x[i]) - mab(yi - y[i])) ~= h[i] then
        v = false
        break
      end
    end
    if v then
      print(xi .. " " .. yi .. " " .. hi)
      os.exit()
    end
  end
end
