#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;
getchar();
while (t--)
{
char a[N];
scanf("%s", a);
int lazy = 0;
for (int i = 0; i < strlen(a); i++)
{
int flag = 1;
for (int j = 0, k = strlen(a) - 1; j <= strlen(a) / 2; 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");
}
}