Sort It Out#10403

Sort It Out

1 second
128 megabytes
Very hard

FJ has cows (with distinct IDs 1, \ldots, n) lined up in a row. FJ likes his cows to be sorted in increasing order of ID, but unfortunately they are currently out of order. Although in the past FJ has used groundbreaking algorithms such as "bubble sort" to sort his cows, today he is feeling quite lazy. Instead, he will yell at specific cows, one at a time, to "sort it out". When yelled at, a cow makes sure she is not out of order (from her point of view). While the cow immediately to her right has a smaller ID, they swap places. Then, while the cow immediately to her left has a larger ID, they swap places. After that, the cow is done "sorting it out": the cow to her left has a smaller ID, and the cow to her right has a larger ID.

FJ wants to choose a subset of cows and then go through this subset, yelling at each cow in turn (in increasing order of ID), again and again until all cows are sorted. For instance, if he chooses the subset of cows with IDs \{2, 4, 5\}, he will yell at cow , then at cow , and then at cow . If the cows are still not sorted, he will yell at the same cows again and again, as many times as necessary.

Since FJ is not sure which cows are paying attention, he wants to minimize the size of this subset. Furthermore, FJ considers the number to be very lucky. Help him find the -th lexicographically smallest subset of minimum size such that repeatedly yelling at its cows eventually results in all cows being sorted.

A subset of \{1, \ldots, n\} is lexicographically smaller than a subset if the list of elements of (in increasing order) is lexicographically smaller than the list of elements of (in increasing order). For instance, \{1, 3, 6\} is lexicographically smaller than \{1, 4, 5\}.

Input

The first line contains an integer n~(1 \le n \le 10^5). The second line contains an integer k~(1 \le k \le 10^{18}). The third line contains integers — the IDs of the cows from left to right.

It is guaranteed that there are at least valid subsets of minimum size.

Output

In the first line, print the size of the minimum subset. Then print the IDs of the cows in the -th lexicographically smallest subset of minimum size in increasing order, one ID per line.

Examples

Example 1

Loading
Loading

Note

Initially, the array is . After FJ yells at the cow with ID , the array becomes . After FJ yells at the cow with ID , the array becomes , and at this point it is sorted.