#CCBCHBAHAI0000031. Dịch phải một vị trí (Cyclic Right Shift by One)

Dịch phải một vị trí (Cyclic Right Shift by One)

Dịch phải một vị trí (Cyclic Right Shift by One)

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem

Given an integer array a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}.

Perform exactly one cyclic right shift. The last element moves to the first position, and every other element moves one position to the right.

Let the resulting array be bb. For n≥2n\ge 2:

b0=an−1,b_0=a_{n-1},

and for every ii such that 1≤i<n1\le i<n:

bi=ai−1.b_i=a_{i-1}.

For n=1n=1, the array remains unchanged.

Print bb.

Input

The first line contains integer nn. The second line contains nn integers a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}.

Output

Print the nn elements after one cyclic right shift on one line.

Subtask

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 10 20 30 40

Explanation

The value 50=a450=a_4 moves to index 00; every other element moves exactly one position to the right.