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.io.*;
  import java.util.*;
  
  public class Main {
  
  //	static boolean[] prime = new boolean[10000000];
  	final static long mod = 998244353;
  
  	public static void main(String[] args) {
  //		sieve();
  		InputReader in = new InputReader(System.in);
  		PrintWriter out = new PrintWriter(System.out);
  
  		int t = in.nextInt();
  		while (t-- > 0) {
  			String str = in.next();
  			if(str.length() % 2 == 0 && str.substring(0, str.length()/2).equals(str.substring(str.length()/2, str.length()))) {
  				out.println("YES");
  			}else {
  				out.println("NO");
  			}
  		}
  
  		out.flush();
  	}
  	
  	static Integer[] intInput(int n, InputReader in) {
  		Integer[] a = new Integer[n];
  		for (int i = 0; i < a.length; i++)
  			a[i] = in.nextInt();
  		return a;
  	}
  
  	static Long[] longInput(int n, InputReader in) {
  		Long[] a = new Long[n];
  		for (int i = 0; i < a.length; i++)
  			a[i] = in.nextLong();
  		return a;
  	}
  
  	static String[] strInput(int n, InputReader in) {
  		String[] a = new String[n];
  		for (int i = 0; i < a.length; i++)
  			a[i] = in.next();
  		return a;
  	}
  
  //	static void sieve() {
  //		for (int i = 2; i * i < prime.length; i++) {
  //			if (prime[i])
  //				continue;	
  //			for (int j = i * i; j < prime.length; j += i) {
  //				prime[j] = true;
  //			}
  //		}
  //	}
  
  }
  
  class Graph {
  	ArrayList<HashSet<Integer>> g;
  
  	Graph(int n) {
  		g = new ArrayList<>();
  		for (int i = 0; i < n; i++) {
  			g.add(new HashSet<>());
  		}
  	}
  
  	void add(int a, int b) {
  		g.get(a).add(b);
  		g.get(b).add(a);
  	}
  
  }
  
  class Data {
  	int val, ind;
  
  	Data(int val, int ind) {
  		this.val = val;
  		this.ind = ind;
  	}
  
  }
  
  class compareVal implements Comparator<Data> {
  
  	@Override
  	public int compare(Data o1, Data o2) {
  		return (o1.val - o2.val);
  	}
  
  }
  
  class compareInd implements Comparator<Data> {
  
  	@Override
  	public int compare(Data o1, Data o2) {
  		return o1.ind - o2.ind == 0 ? o1.val - o2.val : o1.ind - o2.ind;
  	}
  
  }
  
  class InputReader {
  	public BufferedReader reader;
  	public StringTokenizer tokenizer;
  
  	public InputReader(InputStream stream) {
  		reader = new BufferedReader(new InputStreamReader(stream), 32768);
  		tokenizer = null;
  	}
  
  	public String next() {
  		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
  			try {
  				tokenizer = new StringTokenizer(reader.readLine());
  			} catch (IOException e) {
  				throw new RuntimeException(e);
  			}
  		}
  		return tokenizer.nextToken();
  	}
  
  	public int nextInt() {
  		return Integer.parseInt(next());
  	}
  
  	long nextLong() {
  		return Long.parseLong(next());
  	}
  
  	double nextDouble() {
  		return Double.parseDouble(next());
  	}
  
  	String nextLine() {
  		String str = "";
  		try {
  			str = reader.readLine();
  		} catch (IOException e) {
  			e.printStackTrace();
  		}
  		return str;
  	}
  
  }