#CCBCHBAHAI0000034. Dịch đoạn [l, r] sang phải một bước (Right-Shift a Subarray [l, r] by One)

Dịch đoạn [l, r] sang phải một bước (Right-Shift a Subarray [l, r] by One)

Dịch đoạn [l, r] sang phải một bước (Right-Shift a Subarray [l, r] 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} and indices l,rl,r satisfying

0≤l≤r<n.0\le l\le r<n.

Within the segment [l,r][l,r] only, perform one cyclic right shift. Every position outside the segment remains unchanged.

Let the result be bb. If l=rl=r, then b=ab=a. If l<rl<r, then

bl=ar,b_l=a_r, bi=ai−1(l<i≤r),b_i=a_{i-1}\qquad(l<i\le r),

and

bi=ai(i<l or i>r).b_i=a_i\qquad(i<l\text{ or }i>r).

Print bb.

Input

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

Output

Print the array after cyclically shifting segment [l,r][l,r] one position to the right.

Subtask

Subtask 1 (100 points): 1≤n≤2⋅1051\le n\le2\cdot10^5; 0≤l≤r<n0\le l\le r<n; ∣ai∣≤109|a_i|\le10^9.

Example

Input

7 1 4
10 20 30 40 50 60 70

Output

10 50 20 30 40 60 70

Explanation

The segment 20 30 40 50 becomes 50 20 30 40; the elements 10 60 70 are outside the segment and remain unchanged.