#T576. 后缀子串排序
后缀子串排序
Description
For a given string, sort all its suffix substrings. For example, take the string "grain":
Its suffix substrings are:
grain
rain
ain
in
n
Then, sort these substrings in lexicographical order, resulting in: ain, grain, in, n, rain.
Input Format
Each test case consists of a single line containing a string.
Output Format
Output the sorted substrings.
```input1 grain banana ``` ```output1 ain grain in n rain a ana anana banana na nana```markdown
## Source
CodesOnline
The provided text is already in English and follows markdown formatting (a level 2 heading with ##). No translation was needed, so the output remains identical to the source while preserving the markdown structure.