Solved anagram problem.