시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 (추가 시간 없음) 512 MB 0 0 0 0.000%

문제

A permutation of size n is a list of integers (p1, p2, ..., pn) from 1 to n such that each number appears exactly once.

The number of fixed points of a permutation is the number of indices i such that pi = i.

Given three numbers n, m, and k, find the kth lexicographically smallest permutation of size n that has exactly m fixed points (or print -1 if there are fewer than k permutations that satisfy the condition).

입력

The single line of input contains three space-separated integers

n (1 ≤ n ≤ 50) m (0 ≤ mn) k (1 ≤ k ≤ 1018)

where n is the size of the permutations, m is the number of desired fixed points, and the output should be the kth lexicographically smallest permutation of the numbers 1 to n that has exactly m fixed points.

출력

Output the desired permutation on a single line as a sequence of n space-separated integers, or output -1 if no such permutation exists.

예제 입력 1

3 1 1

예제 출력 1

1 3 2

예제 입력 2

3 2 1

예제 출력 2

-1

예제 입력 3

5 3 7

예제 출력 3

2 1 3 4 5