
Mirko dreamt of a histogram last night that consists of
The capacity of a histogram is the maximal amount of water that a histogram can hold so that the configuration of the water is "stable", or, in other words, that it doesn't move under the influence of gravity. The image on the right depicts an example of a stable configuration.
Formally, let us denote the heights of water above the columns with
The configuration of the water is stable if the following holds:
, for each such that , for each such that and
When Mirko woke up, he wanted to know whether he could somehow choose the heights of columns
that are a permutation of the set
Input
The first line of input contains integers
Output
If a histogram of capacity exactly -1
. Otherwise, output numbers
Sample Input 1
3 1
Sample Output 1
3 1 2
Explanation for Sample Output 1
In this configuration, it holds
Sample Input 2
4 1
Sample Output 2
4 3 1 2
Explanation for Sample Output 2
In this configuration it holds
Sample Input 3
8 17
Sample Output 3
6 2 3 1 8 4 5 7
Explanation for Sample Output 3
The sample corresponds to the image from the task.
Comments