Permutation by number#2387

Permutation by number

1 second
64 megabytes
Easy

Find the permutation corresponding to its number in lexicographical order.

Input

The first line contains the integer (1 \leq N \leq 12) — the number of elements in the permutation.

The second line contains the integer (1 \leq K \leq N!) — the number of the permutation.

Output

Print numbers — the required permutation.

Examples

Example 1

Loading
Loading