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

N.times do |i|
  x[i],y[i],h[i]=gets.chomp.split(" ").map { |e| e.to_i }
end

def abs(n)
  return -n if n<0
  return n
end

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

for indx in 0..N-1 do
for i in 0..100 do
  for j in 0..100 do
    cx = i
    cy = j
    hight = h[indx] + abs(cx-x[indx]) + abs(cy-y[indx])
    for k in 0..N-1 do
      is_break = false
      if h[k] != max(hight-abs(cx-x[k])-abs(cy-y[k]),0)
        is_break = true
        break
      end
    end
    next if is_break
    printf("%d %d %d\n",cx,cy,hight)
    exit
  end
end
end
