n = gets.chop.to_i
xs = []
ys = []
hs = []
n.times do
  tmp = gets.chop.split.map(&:to_i)
  xs << tmp[0]
  ys << tmp[1]
  hs << tmp[2]
end
if n > 1
  flag = false
  (0..100).each do |cx|
    (0..100).each do |cy|
      max_hs = []
      n.times do |i|
        max_hs << hs[i] + (cx - xs[i]).abs + (cy - ys[i]).abs
      end
      if max_hs.uniq.count == 1
        ans = max_hs[0]
        puts "#{cx} #{cy} #{ans}"
        flag = true
        break
      end
    end
    break if flag
  end
else
  puts "#{xs[0]} #{ys[0]} #{hs[0]}"
end