Print Prefix and Suffix
The prefix of a string is any leading contiguous part and Suffix is any trailing contiguous part (See sample test case explanation for better understanding). Given a string SS, your task is to first print all the prefixes of SS each in a new line, then print all the suffixes of SS each in a new line.
There is only one input, a string SS containing only lowercase English alphabets.
Print the required output as mentioned above.
1≤|S|≤1031≤|S|≤103, where |S||S| is length of string.
p pr pre prep p ep rep prep
Prefixes of string
prep. All are leading contiguous parts of the given string. Suffixes of string
prep. All are trailing contiguous parts of the given string.