First iteration for anagram