#include <bits/stdc++.h>   using namespace std;   template <typename A, typename B>   ostream &operator<<(ostream &os, const pair<A, B> &p) {     return os <<  (  << p.first <<  ,   << p.second <<  ) ;   }   template <typename T_container, typename T = typename enable_if<                                       !is_same<T_container, string>::value,                                       typename T_container::value_type>::type>   ostream &operator<<(ostream &os, const T_container &v) {     os <<  { ;     string sep;     for (const T &x : v) os << sep << x, sep =  ,  ;     return os <<  } ;   }   void dbg_out() { cerr << endl; }   template <typename Head, typename... Tail>   void dbg_out(Head H, Tail... T) {     cerr <<     << H;     dbg_out(T...);   }   const int MAX_N = 1e5 + 5;   const long long MOD = 1e9 + 7;   const long long INF = 1e9;   const long double EPS = 1e-9;   void solve() {     string str;     cin >> str;     int len = ((int)str.size());     if (len & 1)       cout <<  NO  << endl;     else {       for (int i = 0; i < len / 2; ++i) {         if (str[i] != str[i + len / 2]) {           cout <<  NO  << endl;           return;         }       }       cout <<  YES  << endl;     }   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int tc = 1;     cin >> tc;     for (int t = 1; t <= tc; t++) {       solve();     }   }   