Sorts list from a text file or Console itself. Returns a user-friendly text of categorized entries.