Lexicographic order
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Print all valid bracket sequences in lexicographical order.
Input
The input file contains a natural number n, which does not exceed 10.
Output
Output all valid bracket sequences of length 2n in lexicographical order, with each sequence on a new line.
Examples
Input #1
Answer #1
Submissions 202
Acceptance rate 78%