N = gets.chomp.to_i
A = gets.chomp.split(' ').map(&:to_i)
TOTAL = A.reduce(:+)

M = [0]
0.step((N*2)-1, 2).each do |i|
  i = i % N
  diff = (A[(i+1)%N] - A[i]) * 2
  M[(i+2)%N] = M[i] + diff
end

base = (TOTAL - M.reduce(:+)) / N
puts M.map { |n| n + base }.join(' ')
