A permutation of size 𝒏 is a list of integers (𝑝1, 𝑝2, … , 𝑝n) from 1 to 𝒏 such that each number appears exactly once.
The number of fixed points of a permutation is the number of indices 𝒊 such that 𝑝𝒊 = 𝒊.
Given three numbers 𝒏, 𝒎, and 𝒌, find the 𝒌th lexicographically smallest permutation of size 𝒏 that has exactly
𝒎 fixed points (or print -1 if there are fewer than 𝒌 permutations that satisfy the condition).
输入描述:
The single line of input contains three space-separated integers 𝒏 (1 ≤ 𝒏 ≤ 50) 𝒎 (0 ≤ 𝒎 ≤ 𝒏) 𝒌 (1 ≤ 𝒌 ≤ 1018)
where 𝒏 is the size of the permutations, 𝒎 is the number of desired fixed points, and the output should
be the 𝒌th lexicographically smallest permutation of the numbers 1 to 𝒏 that has exactly 𝒎 fixed points.
输出描述:
Output the desired permutation on a single line as a sequence of 𝒏 space-separated integers, or output -1 if no such permutation exists.