Anagram polynomials