Given a list of strings words, group the anagrams together and return them as a list of lists.
Rules for the output:
- Each inner list must be sorted alphabetically
- The outer list must be sorted by the first element of each inner group
Words that are anagrams of each other contain the same characters in the same frequency.
This is used in content deduplication, thesaurus builders, and plagiarism detection systems.