Anagram replacement