#c22303. Secret word
Secret word
Secret Word
Problem Background
UVA 12467
Problem Description
Given a string , find the longest "secret word" of . A string is a "secret word" if:
- is a substring of ( may equal );
- the reverse of is a prefix of .
Output one line with the string you find.
Input Format
One line with a string .
Output Format
Output one line with a string, the answer.
Sample Input
listentothesilence
Sample Output
sil
Constraints
For all data: , and consists only of lowercase letters.