n = gets.to_i
x = []
y = []
h = []
n.times do |i|
  x[i], y[i], h[i] = gets.split.map(&:to_i)
end
ok = false
(0..100).each do |cy|
  (0..100).each do |cx|
    height = nil
    height_limit = 100
    ok = true
    n.times do |i|
      hh = h[i] + (x[i] - cx).abs + (y[i] - cy).abs
      if h[i] > 0
        if height.nil?
          height = hh
        elsif height != hh
          ok = false
          break
        end
      else
        height_limit = hh if height_limit > hh
      end
    end
    if ok
      puts "#{cx} #{cy} #{height}"
      break
    else
      if height_limit == 1
        puts "#{cx} #{cy} 1"
        ok = true
        break
      end
    end
  end
  break if ok
end
