Under construction

Still being built. Things may change

Alternative Facts

Time limit1.5sMemory limit256 MB

Summary
Rearrange the array A into B so that the first L positions stay within K of the original values, making B lexicographically largest.
Level

Medium6 of 10

Topics
Greedy, Sorting, Heap
Solved
No attempts yet

Statement

In the year 3020 AD, the inauguration of the 237th President of the United States was held. More precisely, it should be called the inaugurations of the presidents. Since the 2884 election, the United States has used an N-party system, so N presidents are elected.

Seohyun is a political reporter for a major news outlet and attended every inauguration. Seohyun found that the number of people who attended the ii-th president's inauguration is AiA_i.

Seohyun now wants to write an article based on this. The article does not need to state facts, and an alternative fact is enough. A sequence BB of length NN is an alternative fact of sequence AA if it satisfies the following two conditions.

  • BB is a rearrangement of AA in any order. That is, sorting AA and sorting BB give the same result.
  • For every integer 1≤i≤L1 \le i \le L, ∣Ai−Bi∣≤K|A_i - B_i| \le K. Here KK and LL are nonnegative integers that Seohyun has in mind.

Seohyun wants the alternative fact in the article to be as great as possible. Sequence BB is greater than sequence CC if, at the first index ii where they differ, Bi>CiB_i > C_i. In other words, BB comes after CC in lexicographic order.

Find the greatest alternative fact for Seohyun.

Input

The first line contains a positive integer NN and nonnegative integers KK and LL. (1≤N≤200,0001 \le N \le 200{,}000, 0≤K≤1090 \le K \le 10^9, 0≤L≤N0 \le L \le N)

The second line contains the sequence AA of length NN, separated by spaces. (1≤Ai≤1091 \le A_i \le 10^9)

Output

On the first line, print the greatest alternative fact of sequence AA, with the numbers separated by spaces.

Examples4

  1. Example 1

    Input
    5 3 5
    7 6 1 9 4
    
    Expected output
    9 7 4 6 1
    
  2. Example 2

    Input
    5 2 5
    7 6 1 9 4
    
    Expected output
    9 6 1 7 4
    
  3. Example 3

    Input
    5 2 3
    7 6 1 9 4
    
    Expected output
    9 7 1 6 4
    
  4. Example 4

    Input
    5 2 0
    7 6 1 9 4
    
    Expected output
    9 7 6 4 1