import re;from itertools import*;G=lambda f:{i for i in map(''.join,permutations("[()]*"*f,f))if re.fullmatch("(\**\[\**\]\**|\**\(\**\)\**)*|\**",i)} exec("print(G(int(input())));print();"*5)
0 1 2 3 4
{''} {'*'} {'[]', '**', '()'} {'(*)', '*()', '[*]', '[]*', '*[]', '()*', '***'} {'**()', '*[]*', '*()*', '[]()', '****', '(**)', '[]**', '[**]', '[][]', '**[]', '()**', '*(*)', '(*)*', '[*]*', '*[*]', '()()', '()[]'}