n = gets.chomp.to_i
xyh = []
n.times do
  xyh.push gets.split.map(&:to_i)
end
all = (0..100).to_a.product((0..100).to_a)
candidates = []
max_ch = 100000
xyh.each do |e|
  x = e[0]
  y = e[1]
  h = e[2]
  as = []
  all.each do |a|
    cx = a[0]
    cy = a[1]
    if h > 0
      ch = h + (x-cx).abs + (y-cy).abs
      as.push [cx, cy, ch]
    else
      i = 1
      while i - (x-cx).abs - (y-cy).abs <= 0 && i <= max_ch
        as.push [cx, cy, i]
        i+=1
      end
    end
  end
  if candidates.empty?
    candidates = as
  else
    candidates &= as
    max_ch = candidates.map { |c| c[2] }.max
  end
end
puts candidates.first.join(' ')
