Anagram generalization