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 java.util.*;
  import java.lang.*;
  import java.io.*;
  
  
  /* Name of the class has to be "Main" only if the class is public. */
  public class Pupil
  {
     
  	
      static FastReader sc = new FastReader();
  
  	public static void main (String[] args) throws java.lang.Exception
  	{
  	           	
  	// your code goes here
               int t=sc.nextInt();
               while(t>0){
                     String s=sc.next();
                     boolean b=true;
                     
                     int val=s.length()/2;
                     
                     if(s.length()==1 || s.length()%2==1)
                     {
                  	   System.out.println("NO");
                     }
                     else {
                  	   int counter=0;
                     while(val<s.length() && counter<s.length()/2)
                     {
                  	   if(s.charAt(counter)!=s.charAt(val))
                  	   {
                  		   b=false;
                  		   break;
                  	   }
                  	   val++;
                  	   counter++;
                  	   
                     }
                     if(b)
                     {
                  	   System.out.println("YES");
                     }
                     else {
                  	   System.out.println("NO");
                     }
  
  
  
  
  
  
                     }
  
  
                t--;
                  }
  
     
  
   
   
           
  		}
  	
  	
  	
  	
  	//	FAST I/O
  	static class FastReader {
          BufferedReader br;
          StringTokenizer st;
          
          public FastReader()
          {
              br = new BufferedReader(
                  new InputStreamReader(System.in));
          }
   
          String next()
          {
              while (st == null || !st.hasMoreElements()) {
                  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;
          }
  	}
  
  public static boolean two(int n)//power of two
  {
  if((n&(n-1))==0)
  {
  return true;
  }
  else{
  return false;
  }
  	
  }	
  
  
  
  
  
  public static boolean isPrime(long n){
  		    
  		    for (int i = 2; i * i <= n; ++i) {
              if (n % i == 0) {
                  return false;
              }
          }
   
          return true;
  		}
  
  
  public static int digit(int n)
  {
      int n1=(int)Math.floor((int)Math.log10(n)) + 1;
      return n1;
  }
  
  
   
  public static long gcd(long a,long b) {
  	if(b==0)
  		return a;
  	return gcd(b,a%b);
  }
   
   
   
   
  
  
  
  
  
  
  
  
   }
   
   //CAAL THE BELOW FUNCTION IF PARING PRIORITY IS NEEDED //
   
  //  PriorityQueue<pair> pq = new PriorityQueue<>(); **********declare the syntax in the main function******
  // pq.add(1,2)///////
   
  // class pair implements Comparable<pair> {
  // 	int value, index;
   
  // 	pair(int v, int i) { index = i; value = v; }
   
  // 	@Override
  // 	public int compareTo(pair o) { return o.value - value; }
  // }
   
  
  // User defined Pair class
  // class Pair {
  //     int x;
  //     int y;
    
  //     // Constructor
  // public Pair(int x, int y)
  //     {
  //         this.x = x;
  //         this.y = y;
  //     }
  // }
  
  
          //     Arrays.sort(arr, new Comparator<Pair>() {
          //     @Override public int compare(Pair p1, Pair p2)
          //     {
          //         return p1.x - p2.x;
          //     }
          // });
  
  
  
  
  // class Pair {
   //       int height, id;
  // 
  //        public Pair(int i, int s) {
  //            this.height = s;
  //            this.id = i;
  //        }
  //    }
          
  
  
  
   
   
   //Arrays.sort(trips, (a, b) -> Integer.compare(a[1], b[1]));
   
  // 		ArrayList<ArrayList<Integer>> connections = new ArrayList<ArrayList<Integer>>();
  // 		for(int i = 0; i<n;i++)
  // 			connections.add(new ArrayList<Integer>());