local mab, mma = math.abs, math.max
local ior = io.input()
local n = ior:read("*n")
local x, y, h = {}, {}, {}
local ref = 1
for i = 1, n do
  x[i], y[i], h[i] = io.read("*n", "*n", "*n")
  if 0 < h[i] then ref = i end
end
local found = false
for cx = 0, 100 do
  for cy = 0, 100 do
    local ch = h[ref] + mab(cx - x[ref]) + mab(cy - y[ref])
    local valid = true
    for i = 1, n do
      if h[i] ~= mma(0, ch - mab(cx - x[i]) - mab(cy - y[i])) then
        valid = false
        break
      end
    end
    if valid then
      found = true
      print(cx .. " " .. cy .." " .. ch)
      break
    end
  end
  if found then break end
end
