Swap
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, …, a_N. The array elements are indexed starting from 1.
Petya is curious to see how a given array of N natural numbers will appear after sequentially applying the procedures Swap(1, N), then Swap(1, N-1), then Swap(1, N-2), and continuing in this pattern until Swap(1, 2).
Input
The input consists of two lines. The first line contains a single natural number N (2 ≤ N ≤ 100000), representing the number of elements in the array.
The second line contains N natural numbers a_1, a_2, …, a_N (1 ≤ a_i ≤ 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.