Ananagrams solution