n = gets.chomp.to_i
x = []
y = []
h = []

n.times do |i|
  x[i], y[i], h[i] = gets.chomp.split.map(&:to_i)
end

101.times do |xx|
  101.times do |yy|
    highest = h[0] + (x[0] - xx).abs + (y[0] - yy)
    next if highest < 0
    flag = false
    1.upto(n - 1) do |u|
      if h[u] != highest - (x[u] - xx).abs - (y[u] - yy).abs
        flag = true
        break
      end
    end
    next if flag
    puts "#{xx} #{yy} #{highest}"
    exit
  end
end
