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: import sys
  # from abc import abstractmethod
  # from collections import deque
  import math
  from typing import AnyStr 
  # import heapq
  # import random
  # import copy
  # from decimal import Decimal
  # from collections import defaultdict
  # from typing import AnyStr
  
  INF = int(1e15 + 1)
  mod = 1000000007
  
  read = sys.stdin.readline
  sys.setrecursionlimit(10**5)
  dx = [0 , 1, 0, -1]
  dy = [-1, 0, 1, 0]
  seg = []
  
  def power(bottom, up):
      if up == 1:
          return bottom
      elif up == 0:
          return 1
      tmp = power(bottom, int(up // 2))
      if up % 2 == 0:
          return (tmp * tmp) % mod
      else:
          return (tmp * tmp * bottom) % mod
  
  def ccw(p1, p2, p3):
      a = p2[0] - p1[0]
      b = p2[1] - p1[1]
  
      c = p3[0] - p1[0]
      d = p3[1] - p1[1]
  
      tmp = a * d - b * c
  
      if tmp > 0:
          return 1
      elif tmp == 0:
          return 0
      else:
          return -1
  
  def lower_bound(item):
      left =0 
      right = len(queue)
  
      while left < right:
          mid = int((left + right) // 2)
          if queue[mid] > item:
              right = mid
          elif queue[mid] <= item:
              left = mid + 1
  
      return int((left + right)// 2)
  
  def make_seg(left, right, node):
      if left == right:
          seg[node] = arr[left - 1]
          return seg[node]
      
      mid = int((left + right) // 2)
      seg[node] = make_seg(left , mid , node * 2)
      seg[node] += make_seg(mid + 1 , right , node * 2 + 1)
  
      return seg[node]
  
  def seg_replace(left , right, node,index, diff):
      if index < left or index > right:
          return
  
      seg[node] += diff
      if left == right:
          return
      
      mid = (left + right) // 2
      seg_replace(left , mid , node * 2 , index, diff)
      seg_replace(mid + 1 , right , node *2 + 1, index,  diff)
  
  
  def seg_sum(left, right, start , end, node):
      if start <= left and right <= end:
          return seg[node]
  
      if end < left or start > right:
          return 0
  
      mid = (left+right) // 2
  
      return seg_sum(left , mid , start , end, node * 2) + seg_sum(mid + 1 , right , start , end, node * 2 + 1)
  
  def lazy_seg_replace(left, right, node,  start, end , diff):
      if seg_lazy[node] != 0:
          seg[node] += seg_lazy[node] * (right - left + 1)
  
          if left != right:
              seg_lazy[node * 2] += seg_lazy[node]
              seg_lazy[node * 2 + 1] += seg_lazy[node]
          
          seg_lazy[node] = 0
  
      if start<= left and right <= end:
          seg_lazy[node] += diff
          seg[node] += seg_lazy[node] * (right - left + 1)
  
          if left != right:
              seg_lazy[node * 2] += seg_lazy[node]
              seg_lazy[node * 2 + 1] += seg_lazy[node]
          
          seg_lazy[node] = 0
          return seg[node]
      
      if end < left or start > right:
          return seg[node]
      
  
      mid = (left + right) // 2
  
      seg[node] = lazy_seg_replace(left, mid, node * 2 , start , end, diff)
      seg[node] += lazy_seg_replace(mid + 1 , right , node * 2 + 1 , start , end , diff)
  
      return seg[node]
  
  def lazy_seg_sum(left , right, node , start , end):
      # print(left , right , start, end)
      if seg_lazy[node] != 0:
          seg[node] += seg_lazy[node] * (right - left + 1)
  
          if left != right:
              seg_lazy[node * 2] += seg_lazy[node]
              seg_lazy[node * 2 + 1] += seg_lazy[node]
          
          seg_lazy[node] = 0
      
      if start <= left and right <= end:
          tmp = seg[node]
          seg[node] = 0
          return tmp
      
      if end < left or right < start:
          return 0
      
      mid = (left+ right) // 2
      if mid >= end:
          tmp = lazy_seg_sum(left , mid , node * 2 , start , end)
      else:
          tmp = lazy_seg_sum(mid + 1 , right , node * 2  + 1, start , end)
  
      seg[node] -= tmp
      return tmp
      # return lazy_seg_sum(left , mid , node * 2 , start , end) + lazy_seg_sum(mid + 1 , right , node * 2 + 1 , start,  end) 
          
  def seg_index(left , right,  node , idx):
      seg[node] -= 1
      if left == right:
          return left
      mid = (left + right) // 2
      if seg[node * 2] < idx:
          return seg_index(mid + 1 , right , node * 2 + 1 , idx - seg[node * 2])
      else:
          return seg_index(left , mid , node * 2 , idx )
      
  
  num = int(read())
  
  answer_li = []
  
  for _ in range(num):
      word = list(read().strip())
  
      if len(word) %2 != 0:
          answer_li.append("NO")
          continue
  # arr = list(read().strip())
  # print(arr)
  
      chk = True
  # print(word)
      for idx in range(len(word) // 2):
          if word[idx] != word[idx + len(word) // 2]:
              chk = False
              break
      
      if chk:
          answer_li.append("YES")
      else:
          answer_li.append("NO")
      # dp = [0 for _ in range(len(word))]
      # k = 0
      # for idx in range(1 , len(word)):
      #     while k>0 and word[k] != word[idx]:
      #         k = dp[k-1]
          
      #     if word[k] == word[idx]:
      #         k += 1
      #         dp[idx] = k
  
      # # print(dp)
  
      # if dp[-1] == len(word) // 2:
      #     answer_li.append("YES")
      # else:
      #     answer_li.append("NO")
  
  
  print("\n".join(answer_li))
  # answer = 0
  # answer_idx = 0
  # for idx in range(len(word)):
  #     if dp[idx] > answer:
  #         answer = dp[idx]
  #         answer_idx = 1
  #     elif dp[idx] == answer:
  #         answer_idx += 1
  
  # if answer == 0:
  #     print(-1)
  # else:
  #     print(answer , answer_idx)