def sort(a, l, r): return sorted(a) n,l,r = map(int,input().split()) a = list(map(int,input().split())) a1 = a[l:r+1] for i in a[:l] + sort(a1,l,r) + a[r+1:]: print(i,end = ' ')