n = gets.to_i
as = []
n.times do
  as << gets.split.map(&:to_i)
end

cx = nil
cy = nil
h = nil

(0..100).each do |x|
  (0..100).each do |y|
    hs = []
    as.each do |a|
      next if a[2] == 0
      hs << [a[2] + (a[0] - x).abs + (a[1] - y).abs, 0].max
    end
    if hs[0] != 0 && hs.uniq.size == 1
      cx = x
      cy = y
      h = hs[0]
      break
    end
  end
end

puts "#{cx} #{cy} #{h}"
