console.log((args=>{
  const [[N],A] = args.trim().split`\n`.map(r=>r.split` `.map(v=>0|v));
  const AA = A.concat(A), B = Array(N+N).fill(0), C = Array(N).fill(0);
  for ( let i = 0; i <N+N;i++ ) B[i+1] = B[i] + ((i&1)?-AA[i]:AA[i]);
  for ( let i = 0; i < N; i++ ) C[i] = (i&1)?B[i]-B[N+i]:B[N+i]-B[i];
  return C.join` `;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));

