local tonumber=function(...)
  local t={...}
  for i=1,#t do
    t[i]=_G.tonumber(t[i])
  end
  return unpack(t)
end

local N=tonumber(io.read())
local A=setmetatable(
  {tonumber(io.read():gmatch("(%d+)"..string.rep("%s+(%d+)",N-1))())},
  {__index=function(o,k) return o[(k-1)%#o+1] 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))
