Code to generate all possible dictionary combinations of a given word