P16960 [SCCPC 2026] The Palindrome String of That Day
Background
:::align{center}

:::
:::epigraph[We still do not know the name of the flower we saw that day]
We have never heard its name, but we remember its fragrance; when we meet the flower again, tears have already streamed down.
:::
Description
One day, Menma and Jintan came across a string $s$ consisting of lowercase English letters.
To kill time, they invented a game: Menma can reorder the characters at all odd indices of the string in any way, and Jintan can reorder the characters at all even indices of the string in any way.
They want to know whether, after such reordering, the string can be turned into a palindrome. Please help them.
A palindrome is a string that reads the same from left to right and from right to left. For example, $\mathtt{aa}$, $\mathtt{aba}$, and $\mathtt{abccba}$ are palindromes, while $\mathtt{sccpc}$, $\mathtt{reality}$, and $\mathtt{ab}$ are not.
Input Format
The first line contains an integer $t$ ($1 \le t \le 100$), the number of testdata sets.
For each testdata set, the only line contains a string $s$ consisting of lowercase English letters ($1 \le |s| \le 100$).
Output Format
For each testdata set, if $s$ can be turned into a palindrome, output one line with "YES"; otherwise, output one line with "NO".
You may output the answer in any letter case. For example, "yEs", "yes", "Yes", and "YES" will all be accepted.
Explanation/Hint
In the first testdata set, the given string itself is already a palindrome.
In the third testdata set, you can reorder the characters at odd indices so that index $1$ is $\mathtt{a}$ and index $3$ is $\mathtt{b}$; at the same time, reorder the characters at even indices so that index $2$ is $\mathtt{b}$ and index $4$ is $\mathtt{a}$. This way, you can get the palindrome $\mathtt{abba}$.
Translated by ChatGPT 5