#include <iostream>
#include <string>
#include <cctype>
#define endl '\n'
using namespace std;
string str;
int n;
bool isPalindrome() {
int a = 0, b = str.size() - 1;
while (a <= b) {
if (toupper(str[a]) != toupper(str[b]))
return false;
a++;
b--;
}
return true;
}
int main() {
cin >> n;
cin.ignore(64, '\n');
for (int i = 0; i < n; i++) {
getline(cin, str);
if (isPalindrome())
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}