Anagram hierarchically