N = gets.to_i

xyh = []

N.times do
  s = gets.split.map(&:to_i)
  xyh << s if s[2] != 0
end

if xyh.size == 1
  puts xyh.join(" ")
  exit
end

for cx in 0..100 do
  for cy in 0..100 do
    h = xyh[0][2]+(xyh[0][0]-cx).abs+(xyh[0][1]-cy).abs
    1.upto(xyh.size-1) do |i|
      if h!= xyh[i][2]+(xyh[i][0]-cx).abs+(xyh[i][1]-cy).abs
        break
      end

      if i == xyh.size-1
        puts [cx,cy,h].join(" ")
      end
    end
  end
end
