Solution to Generate Parentheses