#CCBCHBAHAI0000028. Đổi chỗ từng cặp kề nhau (Swap Adjacent Pairs)

Đổi chỗ từng cặp kề nhau (Swap Adjacent Pairs)

Đổi chỗ từng cặp kề nhau (Swap Adjacent Pairs)

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.

Swap consecutive elements pair by pair from left to right:

(a1,a2),  (a3,a4),  (a5,a6),…(a_1,a_2),\;(a_3,a_4),\;(a_5,a_6),\ldots

If nn is odd, the final element ana_n has no partner and remains unchanged.

Let the resulting array be bb. For every kk such that 2k≤n2k\le n,

b2k−1=a2k,b2k=a2k−1.b_{2k-1}=a_{2k},\qquad b_{2k}=a_{2k-1}.

If nn is odd, additionally bn=anb_n=a_n.

Print bb.

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 swapping adjacent pairs 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

7
1 2 3 4 5 6 7

Output

2 1 4 3 6 5 7

Explanation

The pairs (1,2)(1,2), (3,4)(3,4), and (5,6)(5,6) are swapped; the final value 77 remains unchanged.