Thank you this is really helpful but how do I get to print out all the permutations? I would like to check if there is a certain word in that list of permutations, like an anagram test? Thank you