题目描述
Problem Description
Note: The notes in the musical score are represented by numbers.
A sub-score is defined as a "non-empty continuous sequence of notes." Specifically, after sorting and removing duplicates from a sequence, the difference between adjacent values is 1.
For example:
$(3,4,2),(1,2,3,4,2),(4)$ are sub-scores of $(1,2,3,4,2)$.
Note that $(1,3)$ is not a sub-score.
If two sub-scores start or end at different positions in the composition, they are considered "different sub-scores."
A sub-score is called "good" if any two numbers at different positions within it are distinct.
The performers are very demanding and have the following requirements for the score:
- All notes must be less than $m$.
- There must be exactly $k$ good sub-scores in the sub-scores.
They have come to you to ask if it is possible to fulfill these operations.
Input Format
The first line contains three integers $n, m, k$, whose meanings are described in the problem statement.
Output Format
One line with $n$ integers, representing the score desired by the performers.
If there is one or more scores that meet the requirements, output the one with the smallest lexicographical order; if it is not possible to form the desired score, output -1.
Sample Input and Output
Sample Input #1
3 2 5
Sample Output #1
1 2 1
Sample Input #2
5 5 14
Sample Output #2
1 5 3 2 1
Sample Input #3
5 5 50
Sample Output #3
-1
Notes
For 20% of the data: $1 \le n \le 16, m = 2, 1 \le k \le 1000$
For another 20% of the data: $1 \le n \le 10^6, m = 2, 1 \le k \le 10^{18}$
For another 25% of the data: $1 \le n \le 10^6, m = n, 1 \le k \le 10^{18}$
For 100% of the data: $1 \le n \le 10^6, 1 \le m \le n, 1 \le k \le 10^{18}$
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分