unittest
{
	assert( [ "4", "1 2 3 4" ].parse.expand.solve == "4 2 1 3" );
	assert( [ "3", "1 2 3" ].parse.expand.solve == "3 1 2" );
	assert( [ "1", "1000000000" ].parse.expand.solve == "1000000000" );
	assert( [ "6", "0 6 7 6 7 0" ].parse.expand.solve == "0 6 6 0 7 7" );
}



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

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

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.strip.to!( long );
	input.popFront;
	auto as = input.front.split.to!( long[] );
	return tuple( as );
}

auto solve( long[] as )
{
	auto ts = new long[ as.length ];
	auto ti = as.length / 2;
	
	foreach( ai, a; as )
	{
		ts[ ti ] = a;
		
		// 次の要素を入れる場所を計算
		if( as.length % 2 == 0 )
		{
			// Aの長さが偶数のときは左、右の順で追加していく
			if( ai % 2 == 0 ) ti -= ai + 1;
			else              ti += ai + 1;
		}
		else
		{
			// Aの長さが奇数のときは右、左の順で追加していく
			if( ai % 2 == 0 ) ti += ai + 1;
			else              ti -= ai + 1;
		}
	}
	
	return ts.to!( string[] ).join( " " );
}
