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.Arrays;
  import java.util.InputMismatchException;
  
  /*
  By : SSD
  */
  
  public class A {
  	long mod = (long) (1e9 + 7);
  
  	static class InputReader1 {
  
  		private final InputStream st;
  		private final byte[] buf = new byte[8192];
  		private int cc, sc;
  		private SpaceCharFilter f;
  
  		public InputReader1(InputStream st) {
  			this.st = st;
  		}
  
  		public int t() {
  			if (sc == -1)
  				throw new InputMismatchException();
  			if (cc >= sc) {
  				cc = 0;
  				try {
  					sc = st.read(buf);
  				} catch (IOException e) {
  					throw new InputMismatchException();
  				}
  				if (sc <= 0)
  					return -1;
  			}
  			return buf[cc++];
  		}
  
  		public int nextInt() {
  			int c = t();
  			while (isSpaceChar(c)) {
  				c = t();
  			}
  			int sgn = 1;
  			if (c == '-') {
  				sgn = -1;
  				c = t();
  			}
  			int res = 0;
  			do {
  				res *= 10;
  				res += c - '0';
  				c = t();
  			} while (!isSpaceChar(c));
  			return res * sgn;
  		}
  
  		public long nextLong() {
  			int c = t();
  			while (isSpaceChar(c)) {
  				c = t();
  			}
  			int sgn = 1;
  			if (c == '-') {
  				sgn = -1;
  				c = t();
  			}
  			long res = 0;
  			do {
  				res *= 10;
  				res += c - '0';
  				c = t();
  			} while (!isSpaceChar(c));
  			return res * sgn;
  		}
  
  		public int[] nextIntArray(int n) {
  			int a[] = new int[n];
  			for (int i = 0; i < n; i++) {
  				a[i] = nextInt();
  			}
  			return a;
  		}
  
  		public String readString() {
  			int c = t();
  			while (isSpaceChar(c)) {
  				c = t();
  			}
  			StringBuilder res = new StringBuilder();
  			do {
  				res.appendCodePoint(c);
  				c = t();
  			} while (!isSpaceChar(c));
  			return res.toString();
  		}
  
  		public String nextLine() {
  			int c = t();
  			while (isSpaceChar(c))
  				c = t();
  			StringBuilder res = new StringBuilder();
  			do {
  				res.appendCodePoint(c);
  				c = t();
  			} while (!isEndOfLine(c));
  			return res.toString();
  		}
  
  		public boolean isSpaceChar(int c) {
  			if (f != null)
  				return f.isSpaceChar(c);
  			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
  		}
  
  		private boolean isEndOfLine(int c) {
  			return c == '\n' || c == '\r' || c == -1;
  		}
  
  		public interface SpaceCharFilter {
  			public boolean isSpaceChar(int ch);
  		}
  	}
  
  	class OutputWriter {
  		private final PrintWriter writer;
  
  		public OutputWriter(OutputStream outputStream) {
  			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
  		}
  
  		public OutputWriter(Writer writer) {
  			this.writer = new PrintWriter(writer);
  		}
  
  		public void print(Object... objects) {
  			for (int i = 0; i < objects.length; i++) {
  				if (i != 0) {
  					writer.print(' ');
  				}
  				writer.print(objects[i]);
  			}
  		}
  
  		public void println(Object... objects) {
  			print(objects);
  			writer.println();
  		}
  
  		public void close() {
  			writer.close();
  		}
  	}
  
  	InputReader1 sc;
  	OutputWriter out;
  
  	public static void main(String[] ssd) throws Exception {
  		new A().run();
  	}
  
  	void run() throws Exception {
  
  		sc = new InputReader1(System.in);
  
  		out = new OutputWriter(System.out);
  
  		long s = System.currentTimeMillis();
  		solve();
  		tr(System.currentTimeMillis() - s + "ms");
  		out.close();
  
  	}
  
  	private void solve() {
  
  		int tt = sc.nextInt();
  		while (tt-- > 0) {
  
  			char[] a = sc.nextLine().toCharArray();
  
  			int n = a.length;
  			if ((n & 1) == 1)
  				out.println("NO");
  			else {
  				boolean flag=false;
  				int i = 0, j = (n / 2) ;
  				while (j < n) {
  					
  					if(a[i]==a[j]) {
  						i++;j++;
  					}
  					else {
  						flag=true;
  						break;
  					}
  
  					
  				}
  				if(flag)
  				out.println("NO");
  				else {
  					out.println("YES");
  				}
  			}
  
  		}
  
  	}
  
  	void dbg(Object... o) {
  		out.println(Arrays.deepToString(o));
  	}
  
  	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
  
  	private void tr(Object... o) {
  		if (!oj)
  			System.out.println(Arrays.deepToString(o));
  	}
  }
  