Rewrite Anagrams