io = STDIN
n=io.gets.to_i
xyh=[]
n.times do
  xyh << io.gets.split.map(&:to_i)
end
xyh_a = xyh.select{|x,y,h|h>0}
xyh_b = xyh.select{|x,y,h|b=0}
(0..100).each do |cx|
  (0..100).each do |cy|
    ar = xyh_a.map{|x,y,h|(x-cx).abs+(y-cy).abs+h}.uniq
    if ar.size == 1 && ar[0]>=1
      puts "#{cx} #{cy} #{ar[0]}"
      exit
    end
  end
end
