#CCBCHBAHAI0000027. Đảo mảng tại chỗ - n chẵn/lẻ (In-place Array Reversal - Even/Odd Length)

Đảo mảng tại chỗ - n chẵn/lẻ (In-place Array Reversal - Even/Odd Length)

Đảo mảng tại chỗ - n chẵn/lẻ (In-place Array Reversal - Even/Odd Length)

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem

Given an integer array a1,a2,…,ana_1,a_2,\ldots,a_n.

Reverse it in place by swapping symmetric pairs

ai↔an−i+1a_i\leftrightarrow a_{n-i+1}

for

1≤i≤⌊n2⌋.1\le i\le\left\lfloor\frac n2\right\rfloor.

When nn is odd, the middle element at index (n+1)/2(n+1)/2 is never moved by a swap.

Print the array after all swaps.

Input

The first line contains integer nn. The second line contains nn space-separated integers a1,a2,…,ana_1,a_2,\ldots,a_n.

Output

Print the nn elements after the in-place reversal on one line.

Subtasks

Subtask 1 (100 points): 1≤n≤2⋅1051\le n\le 2\cdot 10^5; ∣ai∣≤109|a_i|\le 10^9.

Example

Input

5
10 20 30 40 50

Output

50 40 30 20 10

Explanation

Swap (a1,a5)(a_1,a_5) and (a2,a4)(a_2,a_4). The middle element a3=30a_3=30 remains in place.