#CCBCHBAHAI0000030. Dịch trái một vị trí (Cyclic Left Shift by One)

Dịch trái một vị trí (Cyclic Left Shift by One)

Dịch trái một vị trí (Cyclic Left Shift by One)

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.

Perform one cyclic left shift: the first element moves to the end, and every other element moves one position to the left.

Let the resulting array be bb. For n≥2n\ge2,

bi=ai+1(1≤i<n),b_i=a_{i+1}\qquad(1\le i<n),

and

bn=a1.b_n=a_1.

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

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 one cyclic left shift 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

20 30 40 50 10

Explanation

Elements at positions 22 through 55 move one position left, while 1010 moves to the end.