Print All Palindromic Substrings
easy
1. You are given a string. 2. You have to print all palindromic substrings of the given string.
Constraints
1 <= length of string <= 500
Format
Input
A String
Output
All palindromic substrings(one in a line). First, all palindromic substrings starting from first character of string will be printed, then from second character and so on.
Example
Sample Input
abcc
Sample Output
a
b
c
cc
c
Question Video