N = gets.chomp.to_i
a = N.times.map { |_i| gets.chomp.split(" ").map(&:to_i) }

101.times do |x|
  101.times do |y|
    i, j, k = a.find { |_i, _j, k| k != 0 }
    # print("i:#{i}, j:#{j}, k:#{k}")
    h = (i - x).abs + (j - y).abs + k
    next if h < 1

    isall = a.all? do |x_pos, y_pos, height|
      [h - (x_pos - x).abs - (y_pos - y).abs, 0].max == height
    end
    if isall
      puts [x, y, h].join(' ')
      exit
    end
  end
end