AnagramFinder Logic Enhanced