#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
while (n--){
int flag = 0;
string a;
cin >> a;
string b = a;
reverse(b.begin(), b.end());
if (a == b)
flag = 1;
else{
int lena = a.size();
for (int i = 0; i < lena; i++){
string s = a;
s.erase(i, 1);
string t = s;
reverse(t.begin(), t.end());
if (t == s)
flag = 1;
}
}
if (flag == 1)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}