#CCBCHBAHAI0000033. Đảo đoạn [l, r] (Reverse a Subarray [l, r])

Đảo đoạn [l, r] (Reverse a Subarray [l, r])

Đảo đoạn [l, r] (Reverse a Subarray [l, r])

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.

Reverse the order of elements in the closed index interval [l,r][l,r], while leaving every element outside that interval unchanged.

Let the result be bb. For every 0≤i<n0\le i<n:

$$b_i= \begin{cases} a_{l+r-i}, & l\le i\le r,\\ a_i, & \text{otherwise}. \end{cases}$$

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 reversing the segment [l,r][l,r].

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 2 5
1 2 3 4 5 6 7

Output

1 2 6 5 4 3 7

Explanation

The segment at indices [2,5][2,5] is 3 4 5 6; reversing it gives 6 5 4 3. Indices 0, 1, and 6 remain unchanged.