N = gets.to_i Y = gets.split.map(&:to_i) B = [] S = Y.sum N.times do |i| B << (S - (N - 1) * Y[i]) end puts B.join(' ')