Anagram partitioner