Anagram greedily