eolymp
bolt
Try our new interface for solving problems
Problems

Palindrome

Palindrome

The rabbit Roger loves to play. Especially he likes to play palindromes. Once he amused a palindrome that accidentally dropped it... Trouble! The palindrome crumbling into tiny pieces, i.e. the letter. Little Roger Rabbit ran to daddy Stan and cry. Stan cannot look at how much upset Roger. He kindly ask you to help Roger with collecting the palindrome. Of course, some letters could be lost after the fall... but Roger rabbit is not too demanding, it only asks you to collect for him the longest possible palindrome. If it hapens that there are a few palindromes of the same length Stan suggests to choose the one that is lexicographically first. \InputFile The only line of the input contains the set of letters which were found at the floor. All symbols -- lowercase Latin letters (\textbf{a}--\textbf{z}). The number of symbols exceeds zero, but doesn't exceed \textbf{200000}. \OutputFile Output one line that will contain the new palindrome of Roger.
Time limit 1 second
Memory limit 64 MiB
Input example #1
arca
Output example #1
aca
Source ACM-ICPC Ukraine 2012, 1st Stage Ukraine, April 21, 2012