n = gets.to_i

clue = []
n.times do
  clue << gets.split.map(&:to_i)
end

ans = nil
clue.sort_by!{|pt| pt[2]}
clue.reverse!

101.times do |i|
  101.times do |j|
    flag = true
    h = nil
    clue.each do |pt|
      if !h
        h = (i-pt[0]).abs + (j-pt[1]).abs + pt[2]
      else
        flag = false if pt[2] != [0, h - (i-pt[0]).abs - (j-pt[1]).abs].max
      end
    end
    ans = "#{i} #{j} #{h}" if flag
  end
end
puts ans
