#C14624. Unique Substrings
Unique Substrings
Unique Substrings
Given a string S, find all unique substrings of S. A substring is defined as any contiguous sequence of characters within S. In mathematical notation, a substring can be described as \(s[i:j]\) where \(0 \leq i < j \leq |S|\). Your task is to output all distinct substrings in lexicographical order, each on a new line.
inputFormat
The input consists of a single line containing the string S. The string is non-empty and consists of alphabetic characters.
outputFormat
Output each unique substring in lexicographical order on a separate line. Do not output any additional spaces or blank lines.
## samplea
a