Finding the anagrams of words