local N=tonumber(io.read())
local A=setmetatable(
  {},
  {__index=function(o,k) return o[(k-1)%#o+1] end}
)
for s in io.read():gmatch("%d+") do
  A[#A+1]=tonumber(s)
end

local S=0
for i=1,N do
  S=S+A[i]
end

local Y={}
for i=1,N do
  local y=S
  for j=1,N-1,2 do
    y=y-A[i+j]*2
  end
  Y[i]=y
end

print(unpack(Y))
