Олимпиадный тренинг

Задача 27312. PSP generation


Задача

Темы:

British Scientists, Inc.'s most innovative development is a way of finding a solution for any problem that can be solved using the tilde-omega-lambda calculus (that is, for none). To do this, they go through all possible bracket sequences of length x, where x is the first digit of a secret constant used in many of the company's developments. If x is odd, they just add one to it. They then use advanced algorithms using neuro-linguistic programming and Fibonacci computed Googold Catalan numbers to locate the terms. But these algorithms have already been implemented and patented. 

Your task is to implement the iteration algorithm. 


Input
The input is the first digit of the secret constant - x (\(1 <= x <= 9\)). 
 

Output
You need to output all spans of length x (or x+1 if \(x \% 2 ==1\)) in lexicographical order.

 

Examples
# Input Output
1 1
( )
[ ]
{}