文件目录

#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int n;
    string s;
    cin >> n;
    while (n--)
    {
        cin >> s;
        bool f = false;
        for (int i = 0; i < s.size(); i++)
        {
            string s1 = s.substr(0, i);
            string s2 = s.substr(i);
            if (s1.size() < 2 || s2.size() < 2)
                continue;
            string s3(s1), s4(s2);
            reverse(s3.begin(), s3.end());
            reverse(s4.begin(), s4.end());
            if (s1 == s3 && s2 == s4)
            {
                f = true;
                break;
            }
        }
        if (f)
            cout << "Yes\n";
        else
            cout << "No\n";
    }
    return 0;
}