There is only one input line; it contains two space separated integers: n (1 ≤ n ≤ 100), representing the number of nodes in the binary search tree, andk(1 ≤k≤ 1018), where we desire thekth lexicographical permutation of the first nintegers which creates a binary search tree of height n– 1, when inserted in the order given in the permutation.
Print thekth lexicographical permutation of the integers 1 throughnof the permutations which, when the values are inserted into a binary search tree, create a tree of heightn– 1. Output the permutation on a single line, following each number in the permutation with a space. If no such permutation exists, output –1 instead.