This is a successor to a previous challenge.
An integer \$1 \leq n \leq 5\$.
Your code should produce all strings that satisfy the following properties:
- Your string should contain exactly two each of the first \$n\$ letters of the alphabet.
- It should not contain the same letter twice in a row
- It must start with the letter
- If there is a letter at index
iin the string, all the letters earlier in the alphabet must occur somewhere at the indices
1..i-1. This means, for example, that the first
ccan't come before the first
- It must contain exactly \$2n\$ zeros.
- For each zero there must exist a pair of identical letters so that one of the pair is somewhere to its left and one of the pair is somewhere to its right in the string.
- It must not contain anything other than zeros and the lower case letters.
n=1,`a00a` is the only valid output. n=2,`a0ab000b`and `ab0000ab` are both valid outputs. `a0bab000` and `a0a0b00b` are not valid. n=3,`a0bc0b0a000c` and `a0b000ca0b0c` are both valid outputs. ` a0cb0b0a000c` and `a0b000ba0c0c` are not valid.