N = gets.to_i
A = []
N.times do
  tmp = gets.split.map(&:to_i)
  next if tmp[2] == 0
  A << tmp
end

for cx in 0..100
  for cy in 0..100
    tmp = A.map{|x, y, h| h + (x - cx).abs + (y - cy).abs}.uniq
    if tmp.size == 1
      puts "#{cx} #{cy} #{tmp[0]}"
      break 
    end 
  end  
end 