Palindrome
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
A palindrome is a string that reads the same forwards and backwards.
Your task is to write a program that takes a set of uppercase Latin letters (which may include duplicates) and rearranges them, possibly deleting some, to form the longest possible palindrome. If there are multiple palindromes of the same maximum length, you should output the one that comes first in alphabetical order.
Input
The input consists of a single string containing up to 10^5 uppercase Latin characters, with no spaces. The string will contain at least one character.
Output
Output the longest palindrome that can be formed, on a single line.
Examples
Input #1
Answer #1
Submissions 372
Acceptance rate 35%