I have the letters a & b and from them I want to take n length combinations of which a and b have limit for repetition.

For example, if n = 7, a = 4 and b = 3, here are possible desired outcome would be starting with 'b':

```
bbbaaaa
bbabaaa
bbaabaa
bbaaaba
bbaaaab
babbaaa
bababaa
babaaba
babaaab
baabbaa
baababa
baabaab
baaabba
baaabab
baaaabb

```

I've looked into a lot of python & c functions, but none do exactly what I'm asking, and I don't know how to alter/use them into doing so.

What I initially thought of was storing all possible combinations and then picking them where a=(length) of them. However, that easily runs into memory issues...
Thanks