#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
int n;
string s, tmp;
cin >> n;
while (n--)
{
cin >> s;
bool mark = false;
for (int i = 0; i < s.size() / 2; i++)
if (s[i] != s[s.size() - 1 - i])
{
mark = true;
break;
}
if (!mark)
printf("Yes\n");
else
{
bool tag = false;
for (int i = 0; i < s.size(); i++)
{
bool flag = true;
tmp = s;
tmp.erase(i, 1);
int len = tmp.size();
for (int j = 0; j < len / 2; j++)
if (tmp[j] != tmp[len - 1 - j])
{
flag = false;
break;
}
if (flag)
{
tag = true;
printf("Yes\n");
break;
}
}
if (!tag)
printf("No\n");
}
}
return 0;
}