Anagram determinant