#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int strlen(char *);
int main() {
  int t, i, j, len, flag;
  char arr[11];
  scanf("%d", &t);
  while (t--) {
    flag = 0;
    scanf("%s", arr);
    len = strlen(arr);
    for (i = 0; i < len / 2; i++)
      if (arr[i] != arr[len - 1 - i]) {
        flag = 1;
        break;
      }
    if (flag)
      printf("\nNO");
    else
      printf("\nYes");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     121c <main+0xec>
movl   $0x0,-0x18(%rbp)
lea    -0x23(%rbp),%rsi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x23(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    %ecx,%eax
jge    11f0 <main+0xc0>
movslq -0xc(%rbp),%rax
movsbl -0x23(%rbp,%rax,1),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movsbl -0x23(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     11dd <main+0xad>
movl   $0x1,-0x18(%rbp)
jmp    11f0 <main+0xc0>
jmp    11e2 <main+0xb2>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1191 <main+0x61>
cmpl   $0x0,-0x18(%rbp)
je     120b <main+0xdb>
lea    0xe05(%rip),%rdi
call   1040 <printf@plt>
jmp    1217 <main+0xe7>
lea    0xdf8(%rip),%rdi
call   1040 <printf@plt>
jmp    1151 <main+0x21>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebc(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,(%rsp)
jae    1164 <main+0x34>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xe98(%rip),%r14
lea    0x5(%rsp),%r13
lea    0xe93(%rip),%r15
lea    0xe88(%rip),%r12
jmp    118e <main+0x5e>
mov    %r12,%rdi
call   1040 <printf@plt>
subl   $0x1,(%rsp)
jb     1154 <main+0x24>
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
cmp    $0x2,%eax
jl     1183 <main+0x53>
mov    %eax,%ecx
shr    %ecx
add    $0xffffffff,%eax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x5(%rsp,%rdx,1),%ebx
movslq %eax,%rsi
cmp    0x5(%rsp,%rsi,1),%bl
jne    1180 <main+0x50>
add    $0x1,%rdx
add    $0xffffffff,%eax
cmp    %rdx,%rcx
jne    11c0 <main+0x90>
mov    %r15,%rdi
jmp    1183 <main+0x53>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"\0ANO\00"
@.str.3 = [5 x i8] c"\0AYes\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [11 x i8]
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %9
9: ; preds = %50, %0
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
%12 = icmp ne i32 %10, 0
br i1 %12, label %13, label %51
13: ; preds = %9
store i32 0, i32* %6
%14 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 0
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 0
%17 = call i32 @strlen(i8* %16)
store i32 %17, i32* %5
store i32 0, i32* %3
br label %18
18: ; preds = %40, %13
%19 = load i32, i32* %3
%20 = load i32, i32* %5
%21 = sdiv i32 %20, 2
%22 = icmp slt i32 %19, %21
br i1 %22, label %23, label %43
23: ; preds = %18
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = load i32, i32* %5
%30 = sub nsw i32 %29, 1
%31 = load i32, i32* %3
%32 = sub nsw i32 %30, %31
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp ne i32 %28, %36
br i1 %37, label %38, label %39
38: ; preds = %23
store i32 1, i32* %6
br label %43
39: ; preds = %23
br label %40
40: ; preds = %39
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %18
43: ; preds = %38, %18
%44 = load i32, i32* %6
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %50
48: ; preds = %43
%49 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %50
50: ; preds = %48, %46
br label %9
51: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"\0ANO\00"
@.str.3 = [5 x i8] c"\0AYes\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp eq i32 %6, 0
br i1 %8, label %36, label %9
9: ; preds = %0, %30
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%11 = call i32 @strlen(i8* %4)
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %30
13: ; preds = %9
%14 = lshr i32 %11, 1
%15 = zext i32 %14 to i64
br label %18
16: ; preds = %18
%17 = icmp eq i64 %29, %15
br i1 %17, label %30, label %18
18: ; preds = %13, %16
%19 = phi i64 [ 0, %13 ], [ %29, %16 ]
%20 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = trunc i64 %19 to i32
%23 = xor i32 %22, -1
%24 = add i32 %11, %23
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = icmp eq i8 %21, %27
%29 = add nuw nsw i64 %19, 1
br i1 %28, label %16, label %30
30: ; preds = %16, %18, %9
%31 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %9 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %18 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %16 ]
%32 = call i32 @printf(i8* dereferenceable(1) %31)
%33 = load i32, i32* %1
%34 = add nsw i32 %33, -1
store i32 %34, i32* %1
%35 = icmp eq i32 %33, 0
br i1 %35, label %36, label %9
36: ; preds = %30, %0
ret i32 0
}