Program to find and group anagrams in a given set of words.