Create a program for word processing textbook on programming using classes: Symbol, Word, Sentence, Punctuation and others. Replace the tab and the sequence of spaces with a single space.
Print the words of the text in alphabetical order by first letter. Words starting with new letters printed with a new line.