#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const ll N=1e5+1e4,M=1e3+1e2;
const ll Maxn=0x3ffffff,Minm=-0x3ffffff;
ll n;
ll l,r;
ll a[N];
signed main()
{
cin>>n;
cin>>l>>r;
for(ll i=1;i<=n;i++)cin>>a[i];
sort(a+l+1,a+r+2);
for(ll i=1;i<=n;i++)cout<<a[i]<<" ";
return 0;
}