You are given T tasks to perform. In each task, you are given a string S of length N. You are allowed to select any two indices i and j (i!=j) of the given string and perform exactly one swap between the characters at these indices.
If it is possible to make the new string a palindrome then print "Yes", else print "No".
Note:
A string is said to be palindrome if it reads same as its reverse form. For example: "madam" , "dad" etc.
INPUT
First line contain an integer T denoting total number of tasks to perform.
Each of the following T lines contains a string S.
OUTPUT
For each task, print a single line with "Yes" if it is possible to make palindrome otherwise print "No" without any quotes.
Constraints:
\(1 \le T \le 5\)
\(2 \le N \le 100000\)
String contains only lowercase English alphabets.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial