gets all anagrams from the list of words