```
def generateParenthesis(self, n):
"""
:type n: int
:rtype: List[str]
"""
if n < 2:
return ["()"*n]
solset = set()
prevcomb = self.generateParenthesis(n-1)
n = len(prevcomb[0])
for e in prevcomb:
base = "(" + e
for i in range(n):
solset.add(base[:i+1] + ")" + base[i+1:])
return list(solset)
```