Sort grouping anagrams