unittest
{
	assert( [ "3", "2 2 4" ].solve == "4 0 4" );
	assert( [ "5", "3 8 7 5 5" ].solve == "2 4 12 2 8" );
	assert( [ "3", "1000000000 1000000000 0" ].solve == "0 2000000000 0" );
}



import std.conv;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	input.popFront;
	auto as = input.front.split.to!( long[] );
	
	// 最初の山の降雨量を計算
	auto anss = new long[ n ];
	anss[ 0 ] = as[ 0 ];
	for( auto i = 1L; i < as.length; i += 2 )
	{
		anss[ 0 ] += -as[ i ] + as[ i + 1 ];
	}
	
	// 2番目以降の山の降雨量を計算
	foreach( i, a, b; lockstep( as, anss[ 0 .. $ - 1 ] ) )
	{
		anss[ i + 1 ] = a * 2 - b;
	}
	return anss.to!( string[] ).join( " " );
}
