n = gets.strip.to_i
a = gets.strip.split(' ').map(&:to_i)

rain = a.inject(:+)

results = []
n.times do |index|
  current_sum = 0
  (n/2).times {|i| current_sum+=a[(index+1+i*2)%n] }
  results.push(rain - current_sum*2)
end

puts results.join(' ')
