Print All Palindromic Substrings

easy
1. You are given a string. 
2. You have to print all palindromic substrings of the given string.

Input Format

A String

Output Format

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.

Constraints

1 <= length of string <= 500

Example

Input
abcc
Output
a
b
c
cc
c
Next
String Compression

Related Questions