Solved Anagrams problem