Improved anagrams exercise.