require 'matrix'

n = gets.to_i
a = gets.split.map(&:to_i)
b = a * 2
ma = Matrix.rows([a])
mb = Matrix.rows([b])
1.upto(n - 1) do |i|
  if i.even?
    ma += mb.minor(0, 1, i, n)
  else
    ma -= mb.minor(0, 1, i, n)
  end
end
puts ma.to_a.flatten.join(' ')