N = gets.chomp.to_i
A = gets.chomp.split(" ").map(&:to_i)
x = []
for i in 0..N-1
    x << (A.each_with_index.inject(0){|sum, (a, index)| sum + a * (-1) ** index})
    A.push(A.shift)
end
puts x.join(" ")