description: A string is called square if it is some string written twice in a row. For example, the strings "aa", "abcabc", "abab" and "baabaa" are square. But the strings "aaa", "abaaab" and "abcdabc" are not square.
  
  For a given string s determine if it is square.
  
  Input
  
  The first line of input data contains an integer t (1 ≤ t ≤ 100) —the number of test cases.
  
  This is followed by t lines, each containing a description of one test case. The given strings consist only of lowercase Latin letters and have lengths between 1 and 100 inclusive.
  
  Output
  
  For each test case, output on a separate line:
  
    * YES if the string in the corresponding test case is square, 
    * NO otherwise. 
  
  
  
  You can output YES and NO in any case (for example, strings yEs, yes, Yes and YES will be recognized as a positive response).
  
  Example
  
  Input
  
  
  10
  a
  aa
  aaa
  aaaa
  abab
  abcabc
  abacaba
  xxyy
  xyyx
  xyxy
  
  
  Output
  
  
  NO
  YES
  NO
  YES
  YES
  YES
  NO
  NO
  NO
  YES
solution: //package codeforces.round762div3;
  
  import java.io.*;
  import java.util.*;
  
  import static java.lang.Math.*;
  
  //Think through the entire logic before jump into coding!
  //If you are out of ideas, take a guess! It is better than doing nothing!
  //Read both C and D, it is possible that D is easier than C for you!
  
  //Be aware of integer overflow!
  //If you find an answer and want to return immediately, don't forget to flush before return!
  
  public class A {
      static InputReader in;
      static PrintWriter out;
  
      public static void main(String[] args) {
          //initReaderPrinter(true);
          initReaderPrinter(false);
          solve(in.nextInt());
          //solve(1);        
      }
  
      static void solve(int testCnt) {
          for (int testNumber = 0; testNumber < testCnt; testNumber++) {
              char[] s = in.next().toCharArray();
              if(s.length % 2 != 0) out.println("NO");
              else {
                  boolean can = true;
                  for(int i = 0; i < s.length / 2; i++) {
                      if(s[i] != s[i + s.length / 2]) {
                          can = false;
                          break;
                      }
                  }
                  out.println(can ? "YES" : "NO");
              }
          }
          out.close();
      }
  
      static void initReaderPrinter(boolean test) {
          if (test) {
              try {
                  in = new InputReader(new FileInputStream("src/input.in"));
                  out = new PrintWriter(new FileOutputStream("src/output.out"));
              } catch (IOException e) {
                  e.printStackTrace();
              }
          } else {
              in = new InputReader(System.in);
              out = new PrintWriter(System.out);
          }
      }
  
      static class InputReader {
          BufferedReader br;
          StringTokenizer st;
  
          InputReader(InputStream stream) {
              try {
                  br = new BufferedReader(new InputStreamReader(stream), 32768);
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
  
          String next() {
              while (st == null || !st.hasMoreTokens()) {
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
              return st.nextToken();
          }
  
          int nextInt() {
              return Integer.parseInt(next());
          }
  
          long nextLong() {
              return Long.parseLong(next());
          }
  
          double nextDouble() {
              return Double.parseDouble(next());
          }
  
          String nextLine() {
              String str = "";
              try {
                  str = br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
  
          Integer[] nextIntArray(int n) {
              Integer[] a = new Integer[n];
              for (int i = 0; i < n; i++) a[i] = nextInt();
              return a;
          }
  
          int[] nextIntArrayPrimitive(int n) {
              int[] a = new int[n];
              for (int i = 0; i < n; i++) a[i] = nextInt();
              return a;
          }
  
          int[] nextIntArrayPrimitiveOneIndexed(int n) {
              int[] a = new int[n + 1];
              for (int i = 1; i <= n; i++) a[i] = nextInt();
              return a;
          }
  
          Long[] nextLongArray(int n) {
              Long[] a = new Long[n];
              for (int i = 0; i < n; i++) a[i] = nextLong();
              return a;
          }
  
          long[] nextLongArrayPrimitive(int n) {
              long[] a = new long[n];
              for (int i = 0; i < n; i++) a[i] = nextLong();
              return a;
          }
  
          long[] nextLongArrayPrimitiveOneIndexed(int n) {
              long[] a = new long[n + 1];
              for (int i = 1; i <= n; i++) a[i] = nextLong();
              return a;
          }
  
          String[] nextStringArray(int n) {
              String[] g = new String[n];
              for (int i = 0; i < n; i++) g[i] = next();
              return g;
          }
  
          List<Integer>[] readGraphOneIndexed(int n, int m) {
              List<Integer>[] adj = new List[n + 1];
              for (int i = 0; i <= n; i++) {
                  adj[i] = new ArrayList<>();
              }
              for (int i = 0; i < m; i++) {
                  int u = nextInt();
                  int v = nextInt();
                  adj[u].add(v);
                  adj[v].add(u);
              }
              return adj;
          }
  
          List<Integer>[] readGraphZeroIndexed(int n, int m) {
              List<Integer>[] adj = new List[n];
              for (int i = 0; i < n; i++) {
                  adj[i] = new ArrayList<>();
              }
              for (int i = 0; i < m; i++) {
                  int u = nextInt() - 1;
                  int v = nextInt() - 1;
                  adj[u].add(v);
                  adj[v].add(u);
              }
              return adj;
          }
  
          /*
              A more efficient way of building a graph using int[] instead of ArrayList to store each node's neighboring nodes.
              1-indexed.
           */
          int[][] buildGraph(int nodeCnt, int edgeCnt) {
              int[] end1 = new int[edgeCnt], end2 = new int[edgeCnt];
              int[] edgeCntForEachNode = new int[nodeCnt + 1], idxForEachNode = new int[nodeCnt + 1];
              for (int i = 0; i < edgeCnt; i++) {
                  int u = in.nextInt(), v = in.nextInt();
                  edgeCntForEachNode[u]++;
                  edgeCntForEachNode[v]++;
                  end1[i] = u;
                  end2[i] = v;
              }
              int[][] adj = new int[nodeCnt + 1][];
              for (int i = 1; i <= nodeCnt; i++) {
                  adj[i] = new int[edgeCntForEachNode[i]];
              }
              for (int i = 0; i < edgeCnt; i++) {
                  adj[end1[i]][idxForEachNode[end1[i]]] = end2[i];
                  idxForEachNode[end1[i]]++;
                  adj[end2[i]][idxForEachNode[end2[i]]] = end1[i];
                  idxForEachNode[end2[i]]++;
              }
              return adj;
          }
      }
  }