#6308. Calf Flac
Calf Flac
Title Description
It is said that if you give infinite cows and infinite giant portable computers (with very large keyboards), the cows will create the best palindrome in the world.
Your job is to witness the wonders created by these cows (the best palindrome). When searching for palindromes, do not pay attention to punctuation marks and spaces (but keep them for output as answers), only consider the letters' A '-'Z' and 'a' -'z '.
The longest palindrome article you are looking for is a string of no more than characters.
We will ensure that the longest palindrome does not exceed characters (before removing punctuation marks and spaces).
Input format
A file with no more than characters.
Output format
The first line of output should include the length of the longest palindrome found. The next line or lines should include the original text of this palindrome (without removing punctuation marks or spaces), Output this palindrome to one or more lines (if the palindrome includes line breaks). If there are multiple palindromes with lengths equal to the maximum value, output the one that appears before them.
Example
Madam, I'm Adam.
11
Madam,I'm Adam.