```
class Solution(object):
def combinationSum(self, candidates, target):
candidates.sort()
output = []
def _helper(c, targ, res):
if targ < 0:
return
if targ == 0:
output.append(res[:])
return
for i in range(c, len(candidates)):
res.append(candidates[i])
_helper(i, targ-candidates[i], res)
res.pop()
_helper(0, target, [])
return output
```