Swap#2970

Swap

1 second
64 megabytes
Very easy

Recently, in one of his programming classes, Petya learned about the while loop operator. He particularly enjoyed using it to reverse the order of elements in an array. To achieve this, Petya wrote a special procedure.

In Pascal, the procedure is written as follows:

procedure Swap(i, j : integer);

var

tmp : integer;

begin

while i < j do begin

tmp := a[i]; a[i] := a[j]; a[j] := tmp;

i := i + 1;

j := j - 1;

end;

end;

In C, the procedure looks like this:

void Swap(int i, int j)

int tmp; while (i < j) tmp = a[i]; a[i] = a[j]; a[j] = tmp; i++; j–;

return;

Both procedures operate on a global array of natural numbers a_1, a_2, \ldots, a_N. The array elements are indexed starting from .

Petya is curious to see how a given array of natural numbers will appear after sequentially applying the procedures \text{Swap}(1, N), then \text{Swap}(1, N-1), then \text{Swap}(1, N-2), and continuing in this pattern until .

Input

The input consists of two lines. The first line contains a single natural number (2 \leq N \leq 100000), representing the number of elements in the array.

The second line contains natural numbers a_1, a_2, \ldots, a_N (1 \leq a_i \leq 1000), separated by spaces — these are the elements of the array.

Output

Output a single line with the elements of the array, separated by spaces, in the order they appear after applying the Swap procedure as described above.

Examples

Example 1

Loading
Loading