#arc077a. [arc077_a]pushpush
[arc077_a]pushpush
Problem Statement
You are given an integer sequence of length , . Let us consider performing the following operations on an empty sequence .
The -th operation is as follows:
- Append to the end of .
- Reverse the order of the elements in .
Find the sequence obtained after these operations.
Constraints
- and are integers.
Input
Input is given from Standard Input in the following format:
Output
Print integers in a line with spaces in between. The -th integer should be .
Sample Input 1
4
1 2 3 4
Sample Output 1
4 2 1 3
- After step 1 of the first operation, becomes: .
- After step 2 of the first operation, becomes: .
- After step 1 of the second operation, becomes: .
- After step 2 of the second operation, becomes: .
- After step 1 of the third operation, becomes: .
- After step 2 of the third operation, becomes: .
- After step 1 of the fourth operation, becomes: .
- After step 2 of the fourth operation, becomes: .
Thus, the answer is 4 2 1 3
.
Sample Input 2
3
1 2 3
Sample Output 2
3 1 2
As shown above in Sample Output 1, becomes after step 2 of the third operation. Thus, the answer is 3 1 2
.
Sample Input 3
1
1000000000
Sample Output 3
1000000000
Sample Input 4
6
0 6 7 6 7 0
Sample Output 4
0 6 6 0 7 7