Given n, generate all combinations of n pairs of well-formed parentheses.
Input: one line, the integer n.
Output: one combination per line. Any order — the template prints canonically.
3
((())) (()()) (())() ()(()) ()()()
1
()
Run your code against the sample tests, or Submit to run the full suite.