n = gets.to_i
points = []
n.times do
  points << gets.chomp.split(' ').map(&:to_i)
end
points.delete_if{|point| point[2] == 0}
x = 0
while x <= 100
  y = 0
  while y <= 100
    flag = true
    h = (points[0][0] - x).abs + (points[0][1] - y).abs + points[0][2]
    points.each do |point|
      if (point[0] - x).abs + (point[1] - y).abs + point[2] != h
        flag = false
      end
    end
    if flag == true
      puts "#{x} #{y} #{h}"
      exit
    end
    y += 1
  end
  x += 1
end
