print all legal parenthesis