Key = sorted string (or 26-count signature). Map key → list of words.
Input
6 eat tea tan ate nat bat
Output
ate eat tea | bat | nat tan