Bracket sequences
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Positive integer . is given. Print in alphabetical order all correct bracket sequences of length **2n**, assuming that the character '' comes before '' in the alphabet.
A correct bracket sequence is either an empty string, or a string like , where is a correct bracket sequence, or a string like , where and are correct bracket sequences.
Input
One integer .
Output
Print in alphabetical order all correct bracket sequences of length , one sequence per line, without spaces.
Examples
Input #1
Answer #1
Submissions 227
Acceptance rate 69%