Again Palindrome?? (II)
Time Limit: 1 sec
The Problem
A palindrome is a word which spelling is same when we spell it from forward or backward. For example “madam” is a palindrome word. Because when we read it from forward or backward it is “madam”. In this problem you will get a string.
Now your task is to make a palindrome from this string. For this process you can rearrange the characters of given string but you can’t add or delete any character in this string. In this process you can get one or more palindrome string. So you have to print the lexicographically smallest palindrome string. If it is not possible then print “No Such Palindrome”.
Suppose a string “dmaam” has two possible palindrome “madam” and “amdma”. Here lexicographically smallest palindrome is “amdma”.
The Input
The input file may contain several lines of input. Each line of the input contains a string S. The length of the string is less than 10^3. Input is terminated by EOF.
The Output
The output for the each input line will contain “Case #X: Y”. Here X is the case number (starting from 1) and Y is the required answer described in the problem statement.
Sample Input
madam
amdegsmaaggadedegdsemmaa
Sample Output
Case #1: amdma
Case #2: aaaddeeggmmssmmggeeddaaa
Problem Setter: Milton Deb