False cards

Arrange N cards so exactly K are false, where each card claims at least a_i cards below it are false; output the specified canonical arrangement or -1.

Medium6GreedySortingImplementationMathInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

You have a deck of NN cards. Card ii carries the claim "at least aia_i of the cards below this one are false".

Once the cards are stacked in a line, every claim can be checked against the stack. A card whose claim holds is true, and a card whose claim fails is false. Whether a card is true or false depends only on how many false cards lie below it.

Find an order that stacks all NN cards so that exactly KK of them are false. Such an order might not exist at all.

Input

The first line contains the integers NN and KK (1N5×1051 \le N \le 5 \times 10^5, 0KN0 \le K \le N).

Each of the next NN lines contains one integer aia_i (0ai5×1050 \le a_i \le 5 \times 10^5).

Output

Several orders can satisfy the condition, so a single answer is fixed by the following rule.

Sort the NN numbers written on the cards in non-decreasing order. Place the NKN-K smallest on top of the deck in that non-decreasing order, then place the remaining KK below them in non-increasing order. If this deck holds exactly KK false cards, print its NN numbers on one line separated by single spaces, from the top card to the bottom card. Otherwise print -1.

If any order at all leaves exactly KK false cards, this deck is one of them.

Note

Decide the claims from the bottom of the deck upward. Take the deck holding 0, 1, 3, 3, 2 from top to bottom.

The bottom card reads 2 and has no false card below it, so its claim fails and the card is false. The card above it reads 3 and has only 1 false card below it, so it is false. The next card reads 3 and has 2 false cards below it, so it is false. The next card reads 1 and has 3 false cards below it, so it is true. The top card reads 0 and is true. This deck holds 3 false cards in total.