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.StringTokenizer;
  import java.io.InputStreamReader;
  import java.io.OutputStreamWriter;
  import java.lang.reflect.Array;
  import java.io.IOException;
  import java.io.BufferedReader;
  import java.io.BufferedWriter;
  import java.math.BigInteger;
  import java.util.Arrays;
  import java.util.Collections;
  import java.util.ArrayList;
  
  public class p1
  {
  	BufferedReader br;
  	StringTokenizer st;
  	BufferedWriter bw;
  	public static void main(String[] args)throws Exception
  	{
  		new p1().run();
  	}
  
  	void run()throws IOException
  	{
  		br = new BufferedReader(new InputStreamReader(System.in));
  		bw=new BufferedWriter(new OutputStreamWriter(System.out));
  
  		solve();
  	}
  	void solve() throws IOException
  	{
  		byte t=nb();
  		while(t-->0)
  		{
  			char c[]=nac();
  			if(solv(c))
  				System.out.println("YES");
  			else
  				System.out.println("NO");
  		}
  	}
  
  
  
  
  
  
  	private boolean solv(char[] c) {
  		if(c.length%2==1)
  			return false;
  
  		for(int i=-1;++i<c.length/2;)
  		{
  			if(c[i]!=c[i+c.length/2])
  				return false;
  		}
  		return true;
  	}
  
  	public int gcd(int a, int b)
  	{
  		if(a==0)
  			return b;
  		else
  		 return gcd(b%a,a);
  	}
  
  	int[] nai(int n) { int a[]=new int[n]; for(int i=-1;++i<n;)a[i]=ni();	return a;}
  
  	long[] nal(int n) { long a[]=new long[n]; for(int i=-1;++i<n;)a[i]=nl();	return a;}
  
  	char[] nac()	{char c[]=nextLine().toCharArray();	return c;}
  
  	char [][] nmc(int n)	{char c[][]=new char[n][]; for(int i=-1;++i<n;)c[i]=nac();	return c;}
  
  	int[][] nmi(int r, int c)	{int a[][]=new int[r][c]; for(int i=-1;++i<r;)a[i]=nai(c);	return a;}
  
  	String next()
  	{
  			while (st == null || !st.hasMoreElements()) {
  					try {
  							st = new StringTokenizer(br.readLine());
  					}
  					catch (IOException e) {
  							e.printStackTrace();
  					}
  			}
  			return st.nextToken();
  	}
  
  	int ni() { return Integer.parseInt(next()); }
  
  	byte nb() { return Byte.parseByte(next()); }
  
  	short ns() { return Short.parseShort(next()); }
  
  	long nl() { return Long.parseLong(next()); }
  
  	double nd()	{	return Double.parseDouble(next());	}
  
  	String nextLine()
  	{
  			String str = "";
  			try {
  					str = br.readLine();
  			}
  			catch (IOException e) {
  					e.printStackTrace();
  			}
  			return str;
  	}
  
  	int countDigits(int l)	{
  		if (l >= 1000000000) return 10;
  		if (l >= 100000000) return 9;
  		if (l >= 10000000) return 8;
  		if (l >= 1000000) return 7;
  		if (l >= 100000) return 6;
  		if (l >= 10000) return 5;
  		if (l >= 1000) return 4;
  		if (l >= 100) return 3;
  		if (l >= 10) return 2;
  		return 1;
  	}
  	int countDigits(long l) {
  		if (l >= 1000000000000000000L) return 19;
  		if (l >= 100000000000000000L) return 18;
  		if (l >= 10000000000000000L) return 17;
  		if (l >= 1000000000000000L) return 16;
  		if (l >= 100000000000000L) return 15;
  		if (l >= 10000000000000L) return 14;
  		if (l >= 1000000000000L) return 13;
  		if (l >= 100000000000L) return 12;
  		if (l >= 10000000000L) return 11;
  		if (l >= 1000000000L) return 10;
  		if (l >= 100000000L) return 9;
  		if (l >= 10000000L) return 8;
  		if (l >= 1000000L) return 7;
  		if (l >= 100000L) return 6;
  		if (l >= 10000L) return 5;
  		if (l >= 1000L) return 4;
  		if (l >= 100L) return 3;
  		if (l >= 10L) return 2;
  		return 1;
  	}
  
  	public int[] primeNO(long limit)
  	{
  		int size=(int)Math.sqrt(limit)+1;
  		int size1=size/2;
  		boolean composite[]=new boolean[size1];
  		int zz=(int)Math.sqrt(size-1);
  
  		for(int i=3;i<=zz;)
  		{
  			for(int j=(i*i)/2;j<size1;j+=i)
  				composite[j]=true;
  
  			for(i+=2;composite[i/2];i+=2);
  		}
  
  		int prime[]=new int[3401];
  		prime[0]=2;
  		int p=1;
  		for(int i=1;i<size1;i++)
  		{
  			if(!composite[i])
  				prime[p++]=2*i+1;
  		}
  
  		////////////////////////////////////////////////////////////////////////////////////////////////////////
  		// System.out.println(p);
  		////////////////////////////////////////////////////////////////////////////////////////////////////////
  		prime=Arrays.copyOf(prime, p);
  		return prime;
  	}
  
  	public static class queue
  	{
  		public static class node
  		{
  			node next;
  			int val;
  
  			public node(int val)
  			{
  				this.val=val;
  			}
  		}
  
  		node head,tail;
  
  		public void add(int val)
  		{
  			node a=new node(val);
  
  			if(head==null)
  			{
  				head=tail=a;
  				return;
  			}
  			tail.next=a;
  			tail=a;
  		}
  
  		public int remove()
  		{
  			int a=head.val;
  			head=head.next;
  			if(head==null)
  				tail=null;
  
  			return a;
  		}
  	}
  
  	public static class stack
  	{
  		public static class node
  		{
  			node next;
  			int val;
  
  			public node(int val)
  			{
  				this.val=val;
  			}
  		}
  
  		node head;
  
  		public void add(int val)
  		{
  			node a=new node(val);
  
  			a.next=head;
  			head=a;
  		}
  
  		public int remove()
  		{
  			int a=head.val;
  			head=head.next;
  			return a;
  		}
  	}
  
  	public static class data
  	{
  		int a,b;
  
  		public data(int a, int b)
  		{
  			this.a=a;
  			this.b=b;
  		}
  	}
  
  	public data[] dataArray(int n)
  	{
  		data d[]=new data[n];
  		for(int i=-1;++i<n;)
  			d[i]=new data(ni(), ni());
  
  		return d;
  	}
  }
  