Anagram resorting