#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstring>
#include<set>
#define ll long long
using namespace std;
const int N = 1010;
const int inf = 0x3f3f3f3f;
#define PI 3.141592653589
#define fr(i,r,l) for(int i=r;i<l;i++)
int main()
{
int t;
cin >> t;
while (t--)
{
getchar();
char a[N];
scanf("%s", a);
int lazy = 0;
int qwer = 0;
for (int i = 0, j = strlen(a) - 1; i <= j; i++, j--)
{
if (a[i] != a[j])qwer = 1;
}
if (qwer == 0)lazy = 1;
for (int i = 0; i < strlen(a); i++)
{
int flag = 1;
for (int j = 0, k = strlen(a) - 1; j <= k; j++, k--)
{
if (j == i)j++;
if (k == i)k--;
if (a[j] != a[k])
{
flag = 0;
}
}
if (flag == 1)
{
lazy = 1;
}
}
if (lazy == 1)printf("Yes\n");
else printf("No\n");
}
}