Suffix Tree is implemented for you, you just have to write the code for DFS traversal and print all the suffixes in lexicographical order
Input Format
Given a string S
Output Format
Output each suffix in lexicographical order on different lines
Constraints
|S| <= 10^5
Example
Input
abca
Output
$ a$ abca$ bca$ ca$