#K66487. Single Removal Palindrome

    ID: 32431 Type: Default 1000ms 256MiB

Single Removal Palindrome

Single Removal Palindrome

Given a string (s), determine whether it is possible to remove exactly one character so that the remaining characters can be rearranged to form a palindrome. A string can be rearranged into a palindrome if and only if at most one character appears an odd number of times.

For example, for the input string "abca", by removing the character at the appropriate position, the remaining string can be rearranged into a palindrome.

inputFormat

The input consists of a single non-empty string (s) read from standard input. The string contains only ASCII characters.

outputFormat

Output either (\texttt{True}) or (\texttt{False}) to standard output. (\texttt{True}) indicates that it is possible to remove one character such that the remaining characters can be rearranged into a palindrome; otherwise, output (\texttt{False}).## sample

abca
True