```
class Solution(object):
def generateParenthesis(self, n):
"""
:type n: int
:rtype: List[str]
"""
if n == 0:
return []
if n == 1:
return ['()']
return self.findAll(n)
def findAll(self, n):
if n == 1:
return ['()']
recur_list = self.findAll(n-1)
paran = []
for r in recur_list:
center = '(' + r + ')'
paran.append(center)
left = '()' + r
right = r + '()'
paran.append(left)
if left != right:
paran.append(right)
return paran
```