n = gets.to_i
pts = n.times.map{ gets.split.map(&:to_i) }
pts_0 = pts.select{ |_, _, h| h <= 0 }
pts_1 = pts.select{ |_, _, h| h > 0 }
(0..100).each do |xx|
  (0..100).each do |yy|
    heights = pts_1.map{ |x, y, h| (x - xx).abs + (y - yy).abs + h }
    if heights.uniq.size == 1
      h = heights[0]
      if pts_0.all?{ |x, y, _| h - (x - xx).abs - (y - yy).abs <= 0 }
        puts [xx, yy, h].join(" ")
        break
      end
    end
  end
end
