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