eolymp
bolt
Try our new interface for solving problems
Problems

Brackets (2)

Brackets (2)

Print all correct bracket expressions of length \textbf{n}, consisting of round and square brackets. \InputFile One even integer \textbf{n} (\textbf{1}  ≤\textit{ }\textbf{n}\textit{ }≤ \textbf{14}). \OutputFile Print each expression on a separate line.
Time limit 2 seconds
Memory limit 64 MiB
Input example #1
4
Output example #1
()()
()[]
(())
([])
[]()
[][]
[()]
[[]]