Second iteration for anagram