In Bash or something that supports arrays, you could put the character set in an array and loop over the array again, prepending the characters again:
chars=( {a,b,c} )
doubles=()
triplets=()
for c in "${chars[@]}" ; do
doubles+=( ${chars[@]/#/$c} )
done
for c in "${chars[@]}" ; do
triplets+=( ${doubles[@]/#/$c} )
done
echo "${triplets[@]}"
that prints aaa aab aac ... ccc, and you can repeat as necessary for the longer ones, or turn it into a recursive function. (The ${var//} is a pattern substitution where # marks the start of the string. When it's applied to an array, it applies to all values of the array, one at a time.)