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

def max(a,b)
  a > b ? a : b
end

N.times do
  a,b,c = gets.chomp.split.map(&:to_i)
  x << a
  y << b
  h << c
end

ans_h = 1
ans_x = 0
ans_y = 0

0.upto(100) do |c_x|
  0.upto(100) do |c_y|
    flag = true
    h_tmp = 0

    N.times do |i|
      next if h[i] == 0

      if h_tmp == 0
        # 登録されていなかったら登録する
        h_tmp = h[i] + (x[i]-c_x).abs + (y[i]-c_y).abs
      else
        if h_tmp != h[i] + (x[i]-c_x).abs + (y[i]-c_y).abs
          flag = false
          break
        end
      end
    end

    if flag == true
      ans_h = h_tmp
      ans_x = c_x
      ans_y = c_y
    end
  end
end


puts [ans_x, ans_y, ans_h].join(' ')
