Anagram theorem