solution to Generate Parentheses