Anagram linearizing