#K72317. Rearrange to Form a Palindrome

    ID: 33727 Type: Default 1000ms 256MiB

Rearrange to Form a Palindrome

Rearrange to Form a Palindrome

Given a string s consisting of lowercase English letters, determine whether it is possible to rearrange the letters of s to form a palindrome. Recall that a palindrome is a string that reads the same forwards and backwards. In order for a string to be rearranged into a palindrome, at most one character can appear an odd number of times. This condition can be formally written as: $$\text{odd\_count} \le 1$$ where \(\text{odd\_count}\) is the number of characters with an odd frequency.

Your task is to process multiple test cases. For each test case, output "YES" if the string can be rearranged to form a palindrome, otherwise output "NO".

inputFormat

The first line contains an integer T, representing the number of test cases. Each of the following T lines contains a single string consisting of lowercase English letters.

outputFormat

For each test case, output a single line containing either "YES" or "NO" indicating whether the string can be rearranged to form a palindrome.

## sample
3
civic
ivicc
hello
YES

YES NO

</p>