generate the same hash from words that are permutations of each other and saves them in a hash table