Anagram flattener