n = gets.to_i
l = Array.new(n) { gets.split.map(&:to_i) }
u, v, h = l.find { |_, _, h| h != 0 }
l.delete([u, v, h])

101.times do |i|
  101.times do |j|
    central_h = h + (i - u).abs + (j - v).abs
    next if l.any? { |x, y, bh| central_h - (i - x).abs - (j - y).abs != bh }

    puts [i, j, central_h].join(' ')
    exit
  end
end