def max(a,b); a > b ? a : b end

n = gets.to_s.to_i
x,y,h =  Array.new(n){ gets.to_s.split.map{|t| t.to_i } }.sort_by{|_,_,h| h }.transpose

0.upto(100) do |c_x|
  0.upto(100) do |c_y|
    
    ok = true
    top = h[-1] + (x[-1]-c_x).abs + (y[-1]-c_y).abs
    n.times do |i|
      
      t = max(top - (x[i]-c_x).abs - (y[i]-c_y).abs, 0)
      
      if h[i] != t
        ok = false
        break
      end
    end
    
    if ok
      puts "#{c_x} #{c_y} #{top}"
      exit
    end
  end
end