Anagram diagonalize