Anagram iteratively