allOptions using storeAllOptions function.generateWords function with the input string s and an empty string currString.currString is complete (length equals the number of options in allOptions), add it to the result list expandedWords and return.currOptions.currOptions, and for each character:
currString.generateWords with the updated currString.expandedWords.