Formation
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Help Denis create a program that generates the k-th lexicographically smallest valid bracket sequence consisting of 2n brackets.
Input
The input consists of a single line containing two integers, n and k, where 1 ≤ n ≤ 18.
Output
Output the desired valid bracket sequence. It is guaranteed that such a sequence exists.
Examples
Input #1
Answer #1
Submissions 134
Acceptance rate 22%