#########			##	##     ##    	  ####  #####  ##     #  ##     #		##
	#			   # #	# #   # #		 #	  #	#	#  # #    #  # #    #	   # #
	#			  #  #	#  ###  #	    #		#	#  #  #   #  #  #   #	  #  #
	#			 #####	#	#	#	   #    ###	#	#  #   #  #  #   #  #    #####
	#			#    #	#		#	   #    # #	#	#  #	# #  #	  # #   #    #
######### 	   #     # 	#		#		##### #	#####  #	 ##  #	   ##  #     #

"""

PPPPPPP       RRRRRRR		    OOOO	  VV        VV    EEEEEEEEEE
PPPPPPPP      RRRRRRRR         OOOOOO     VV       VV	  EE
PPPPPPPPP     RRRRRRRRR       OOOOOOOO    VV      VV	  EE
PPPPPPPP      RRRRRRRR        OOOOOOOO    VV     VV    	  EEEEEE
PPPPPPP       RRRRRRR         OOOOOOOO    VV    VV        EEEEEEE
PP  		  RRRR			  OOOOOOOO    VV   VV         EEEEEE
PP			  RR  RR          OOOOOOOO    VV  VV          EE
PP			  RR    RR         OOOOOO     VV VV           EE
PP			  RR      RR        OOOO      VVVV            EEEEEEEEEE

"""

"""
 Perfection is achieved not when there is nothing more to add, but rather when there is nothing more to take away.
"""
import sys
input = sys.stdin.readline
# from bisect import bisect_left as lower_bound;
# from bisect import bisect_right as upper_bound;
# from math import ceil, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1
    return x

def factorial(x, m):
	val = 1
	while x>0:
		val = (val * x) % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp;

## gcd function
def gcd(a,b):
    if b == 0:
        return a;
    return gcd(b, a % b);

## lcm function
def lcm(a, b):
	return (a * b) // gcd(a, b)

## nCr function efficient using Binomial Cofficient
def nCr(n, k):
	if k > n:
		return 0
	if(k > n - k):
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

## upper bound function code -- such that e in a[:i] e < x;
def upper_bound(a, x, lo=0, hi = None):
    if hi == None:
        hi = len(a);
    while lo < hi:
        mid = (lo+hi)//2;
        if a[mid] < x:
            lo = mid+1;
        else:
            hi = mid;
    return lo;

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p):
    res = 1
    x = x % p
    if (x == 0) :
        return 0
    while (y > 0) :
        if ((y & 1) == 1) :
            res = (res * x) % p
        y = y >> 1
        x = (x * x) % p
    return res

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b;

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];

    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;

# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n):
    prime = [True for i in range(n+1)]
    prime[0], prime[1] = False, False
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

# Euler's Toitent Function phi
def phi(n) :

    result = n
    p = 2
    while(p * p<= n) :
        if (n % p == 0) :
            while (n % p == 0) :
                n = n // p
            result = result * (1.0 - (1.0 / (float) (p)))
        p = p + 1
    if (n > 1) :
        result = result * (1.0 - (1.0 / (float)(n)))

    return (int)(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False

	return True

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
spf = [0 for i in range(MAXN)]
# spf_sieve();
def factoriazation(x):
    res = []
    for i in range(2, int(x ** 0.5) + 1):
    	while x % i == 0:
    		res.append(i)
    		x //= i
    if x != 1:
   		res.append(x)
    return res
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()));

def float_array():
    return list(map(float, input().strip().split()));

## taking string array input
def str_array():
    return input().strip().split();

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

from itertools import permutations
import math

from bisect import bisect_left

def solve():
	n = int(input())
	stripe = list(map(int, input().split()))
	for i in range(1, n):
		stripe[i] += stripe[i - 1]
	c = 0
	if stripe[-1] % 2 == 1:
		print(0)
		return
	for x in stripe[:-1]:
		if x == stripe[-1] // 2:
			c += 1
	print(c)

if __name__ == '__main__':
	for _ in range(1):
		solve()
	# fin_time = datetime.now()
# 	print("Execution time (for loop): ", (fin_time-init_time))


n = int(input())
l =list(map(int,input().split(None,n)[:n]))
s_i = [0]
tam = len(l)
j = -1
cont = 0

for i in range(tam-1):

    s_i.append(s_i[i]+l[i])

s_f = [0]
while(tam>=1):
    s_f.append(s_f[j+1]+l[tam-1])
    j+=1
    tam-=1
aux = len(l)-1
for i in range(1,len(l)):
    if(s_i[i]==s_f[aux]):
        cont+=1
    aux-=1

print(cont)

# 1534357840984


N = int(input())
li = input().split()
res = 0
acu = []
for i in range(N):
    n = int(li[i])
    acu += [0]
    if i == 0:
        acu[i] = n
    else:
        acu[i] = acu[i - 1] + n
for i in range(N-1):
    if acu[i] == (acu[N-1]-acu[i]):
        res += 1

print(res)


n=int(input())
a=list(map(int,input().split()))
tsum=0
for i in a:
    tsum+=i

if tsum%2!=0:
    print(0)
else:
    tsum//=2
    count=0
    helper=0
    for j in a:
        helper+=j
        if tsum==helper:
            count+=1
    if tsum==0:
            print(count-1)
    else:
        print(count)


from functools import reduce
_ = input()
print(list(reduce(lambda x, y: x + [x[-1] + y], list(map(int, input().split()))[:-1], [0])).count(0) - 1)


_ = input()
tmp = list(map(int, input().split()))
result = 0
pref = [0] * len(tmp)
suff = [0] * len(tmp)
pref[0] = tmp[0]
for i in range(1, len(pref)):
    pref[i] = pref[i - 1] + tmp[i]
suff[-1] = tmp[-1]
for i in range(len(suff) - 2, -1, -1):
    suff[i] = suff[i + 1] + tmp[i]
#print(pref)
#print(suff)
for i in range(0, len(tmp) - 1):
    if pref[i] == suff[i + 1]:
        result += 1
print(result)


from functools import reduce
_ = input()
tmp = list(map(int, input().split()))
print(list(reduce(lambda x, y: x + [x[-1] + y], tmp[:-1], [0])).count(0) + \
      list(reduce(lambda x, y: x + [x[-1] + y], tmp[:-1], [0])).count(sum(tmp) // 2) - 1)


#k=int(input())
#n,m=map(int,input().split())
import sys

#a=list(map(int,input().split()))

#b=list(map(int,input().split()))
import math

n=int(input())

a=list(map(int,input().split()))

suml=0

sumr=sum(a)
cnt=0

for i in range(n-1):
    suml+=a[i]
    sumr-=a[i]

    if suml==sumr:
        cnt+=1

print(cnt)


n = int(input())
v = list(map(int, input().split()))

s1 = 0
s2 = sum(v)
c = 0

for i in range(n-1):
    s1 += v[i]
    s2 -= v[i]
    if(s1 == s2):
        c += 1
print(c)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = []

result = 0

for i in range(nums[0]):
    params += list(map(int, input().split()))

half_num = int(len(params)/2)

if sum(params) % 2 == 0:
    partA = sum(params[:half_num])
    partB = sum(params[half_num:])

    if partA > partB and partA > 0 and partB > 0:

        for i, el in enumerate(range(half_num), start=0):
            if sum(params[:half_num - i]) == sum(params[half_num - i:]):
                result += 1
    elif partA < partB and partA > 0 and partB > 0:
        for i, el in enumerate(range(half_num), start=0):
            if sum(params[:half_num + i]) == sum(params[half_num + i:]):
                result += 1

    else:
        for i, el in enumerate(range(len(params)), start=1):
            if len(params[:i]) == 0 or len(params[i:]) == 0:
                break
            if sum(params[:i]) == sum(params[i:]):
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = []

result = 0

for i in range(nums[0]):
    params += list(map(int, input().split()))

half_num = int(len(params)/2)

if sum(params) % 2 == 0:
    partA = sum(params[:half_num])
    partB = sum(params[half_num:])

    if partA > partB and partA > 0 and partB > 0:

        for i, el in enumerate(range(half_num), start=0):
            if sum(params[:half_num - i]) == sum(params[half_num - i:]):
                result += 1
    elif partA > partB and partA > 0 and partB > 0:
        for i, el in enumerate(range(half_num), start=0):
            if sum(params[:half_num + i]) == sum(params[half_num + i:]):
                result += 1

    else:
        for i, el in enumerate(range(len(params)), start=1):
            if len(params[:i]) == 0 or len(params[i:]) == 0:
                break
            if sum(params[:i]) == sum(params[i:]):
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
params = list(map(int, input().split()))

refAns = int(sum(params)/2)
result = 0

if int(sum(params)) % 2 == 0:

    if len(set(params)) == 1:
        result = len(params) - 1

    else:
        for i in range(nums[0]):
            if len(params[i+1:]) == 0:
                break
            elif sum(params[:i+1]) == refAns:
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = []

result = int()

for i in range(nums[0]):
    params += list(map(int, input().split()))

def fun1(index):
    if sum(params[:index]) == 0 and sum(params[index:]) == 0:
        return True
    else:
        return False

for i, el in enumerate(params, start=1):
    if el < 0 or el == 0:
        if not fun1(i):
            continue
        else:
            print(i)
            break
else:
    print(0)


nums = int(input())
param = list(map(int, input().split()))
s = sum(param)

accur = 0
result = 0

for i in range(nums - 1):
    accur += param[i]
    result += s - accur

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
param = list(map(int, input().split()))

refAns = int(sum(param)/2)
result = 0

if int(sum(param)) % 2 == 0:

    if len(set(param)) == 1:
        result = len(param) - 1

    else:
        for i in range(nums[0]):
            if sum(param[:i+1]) == refAns and len(param[i+1:]) > 0:
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
params = list(map(int, input().split()))

refAns = int(sum(params)/2)
result = 0

if int(sum(params)) % 2 == 0:

    if len(set(params)) == 1:
        result = len(params) - 1

    else:
        for i in range(nums[0]):
            if len(params[i+1:]) > 0:
                break
            elif sum(params[:i+1]) == refAns:
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
param = list(map(int, input().split()))

refAns = int(sum(param)/2)
accur = 0
result = 0

if int(sum(param)) % 2 == 0:

    if len(set(param)) == 1:
        result = len(param) - 1
    else:
        for i, el in enumerate(param, start=1):
            accur += el
            if accur == refAns and len(param[i:]) > 0:
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = []

result = 0

for i in range(nums[0]):
    params += list(map(int, input().split()))

half_num = int(len(params)/2)

if sum(params) % 2 == 0:
    partA = sum(params[:half_num])
    partB = sum(params[half_num:])

    for i, el in enumerate(range(half_num), start=0):
        if len(params[:half_num - i]) == 0 or (sum(params[:half_num - i]) - max(params[:half_num - i])) > (sum(params[half_num - i:]) + max(params[:half_num - i])):
            break
        if sum(params[:half_num - i]) == sum(params[half_num - i:]):
            result += 1
    for i, el in enumerate(range(half_num), start=0):
        if len(params[half_num + i:]) == 0 or (sum(params[:half_num + i]) + max(params[half_num - i:])) < (sum(params[half_num + i:]) - max(params[half_num + i:])):
            break
        if sum(params[:half_num + i]) == sum(params[half_num + i:]):
            result += 1

    if partA == partB:
        result /= 2

print(int(result))


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
params = list(map(int, input().split()))

refAns = int(sum(params)/2)
result = 0

if int(sum(params)) % 2 == 0:
    for i in range(nums[0]):
        if sum(params[:i+1]) == refAns and len(params[i+1:]) > 0:
            result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
param = list(map(int, input().split()))

refAns = int(sum(param)/2)
result = 0

if int(sum(param)) % 2 == 0:

    if len(set(param)) == 1:
        result = len(param) - 1
    else:
        result = sum([1 for i in range(nums[0]) if sum(param[:i+1])
                      == refAns and len(param[i+1:]) > 0])

print(result)


import sys
import numpy as np

input = sys.stdin.readline

nums = list(map(int, input().split()))
params = list(map(int, input().split()))

refAns = int(np.sum(params)/2)
result = 0

if int(np.sum(params)) % 2 == 0:
    for i in range(nums[0]):
        if np.sum(params[:i]) == refAns and len(params[i:]) > 0:
            result += 1

print(result)


nums = int(input())
param = list(map(int, input().split()))
s = sum(param)

accur = 0
result = 0

for i in range(nums - 1):
    accur += param[i]
    result += accur == s - accur

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = []

result = 0

for i in range(nums[0]):
    params += list(map(int, input().split()))

if sum(params) % 2 == 0:
    for i, el in enumerate(params, start=1):
        if(len(params[:i]) == 0 or len(params[i:]) == 0):
            continue
        if sum(params[:i]) == sum(params[i:]):
            result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
params = list(map(int, input().split()))

refAns = int(sum(params)/2)
result = 0

def myreduce(fun, seq):
    it = iter(seq)
    value = next(it)

    for el in it:
        value = fun(value, el)

    return int(value)

def add(x, y):
    return x + y

if myreduce(add, params) % 2 == 0:

    if len(set(params)) == 1:
        result = len(params) - 1

    else:
        for i in range(nums[0]):
            if myreduce(add, params[:i+1]) == refAns and len(params[i+1:]) > 0:
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = []

result = 0

for i in range(nums[0]):
    params += list(map(int, input().split()))

half_num = int(len(params)/2)

if sum(params) % 2 == 0:
    partA = sum(params[:half_num])
    partB = sum(params[half_num:])

    for i, el in enumerate(range(half_num), start=0):
        if len(params[:half_num - i]) == 0 or (sum(params[:half_num - i]) - max(params[:half_num - i])) > (sum(params[half_num - i:]) + max(params[:half_num - i])):
            break
        if sum(params[:half_num - i]) == sum(params[half_num - i:]):
            result += 1
    for i, el in enumerate(range(half_num), start=0):
        if len(params[half_num + i:]) == 0 or (sum(params[:half_num + i]) + max(params[half_num - i:])) < (sum(params[half_num + i:]) - max(params[half_num + i:])):
            break
        if sum(params[:half_num + i]) == sum(params[half_num + i:]):
            result += 1

    if partA == partB:
        result /= 2

print(result)


nums = int(input())
param = list(map(int, input().split()))
s = sum(param)

accur = 0
result = 0

for i in range(nums - 1):
    accur += param[i]
    if accur == (s - accur):
        result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
param = list(map(int, input().split()))

refAns = int(sum(param)/2)
accur = 0
result = 0

if int(sum(param)) % 2 == 0:

    for i, el in enumerate(param, start=1):
        accur += el
        if accur == refAns and len(param[i:]) > 0:
            result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
params = list(map(int, input().split()))

refAns = int(sum(params)/2)
result = 0

if int(sum(params)) % 2 == 0:

    if len(set(params)) == 1:
        result = len(params) - 1

    else:
        for i in range(nums[0]):
            if sum(params[:i+1]) == refAns and len(params[i+1:]) > 0:
                result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))
params = list(map(int, input().split()))

refAns = int(sum(params)/2)
result = 0

if len(set(params)) == 1:
    result = len(params) - 1

elif int(sum(params)) % 2 == 0:
    for i in range(nums[0]):
        if sum(params[:i+1]) == refAns and len(params[i+1:]) > 0:
            result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = list(map(int, input().split()))

refAns = int(sum(params)/2)
result = 0

if int(sum(params)) % 2 == 0:
    for i, j in enumerate(params, start=1):
        if sum(params[:i]) == refAns and len(params[i:]) > 0:
            result += 1

print(result)


import sys

input = sys.stdin.readline

nums = list(map(int, input().split()))

params = []

result = 0

for i in range(nums[0]):
    params += list(map(int, input().split()))

refAns = int(sum(params)/2)
if int(sum(params)) % 2 == 0:
    for i, j in enumerate(params, start=1):
        if sum(params[:i]) == refAns and len(params[i:]) > 0:
            result += 1

print(result)


n=int(input())
k=0
a=[]
for i in input().split():
    a.append(int(i))
sum1=sum(a)
sum2=0
for i in range(n-1):
    sum1-=a[i]
    sum2+=a[i]
    if sum1==sum2:
        k+=1
print(k)


n = gets.to_i

sum = 0
mas = gets.split.map{|i| i.to_i}
mas.map{|i| sum += i}
res = 0
tsum = 0

(n-1).times do |i|
    tsum += mas[i]
    sum -= mas[i]
    if tsum == sum then
        res += 1
    end
end

puts res


n = gets.chomp.to_i
s = gets.chomp
sa = s.split(/ /)
sa.map!{|x| x.to_i }

sum = 0
for i in 0..n-1
	sum += sa[i]
end

ret = 0
left = 0
for i in 0..n-2
	left += sa[i]
	if sum - left == left
		ret += 1
	end
end
puts ret


gets
a=gets.split.map &:to_i
s=a.inject:+
t=x=0
(a.size-1).times{|i|x+=s==2*(t+=a[i])?1:0}
p x


gets
a=gets.split.map{|i|i=to_i}
s=a.inject(0){|s,e|s+e}
t=x=0
(a.size-1).times{|i|x+=s==2*(t+=a[i])?1:0}
p x


gets
a=gets.split.map &:to_i
s=a.inject:+
t=x=0
(a.size-2).times{|i|x+=s==2*(t+=a[i])?1:0}
p x


gets
a=gets.split.map &:to_i
s=a.inject:+
t=x=0
(a.size).times{|i|x+=s==2*(t+=a[i])?1:0}
p x


n=gets.to_i
a=gets.split.map(&:to_i)
sum=a.inject(0){|a,b| a+=b}
lsum=0
ans=0
(n-1).times{|i|
        lsum+=a[i]
        sum-=a[i]
        ans+=1 if lsum==sum
}
p ans


gets
a=gets.split.map &:to_i
s=a.inject:+
t=x=0
0.upto(a.size-2){|i|t+=a[i]
s==2*t&&x+=1}
p x


n=gets.chomp!.to_i
tmp=gets.chomp!.split
memo=Array.new(n)
n.times do |i|
  memo[i]=tmp[i].to_i
end
sum=Array.new(n)
sum[0]=memo[0]
1.upto(n-1) do |i|
  sum[i]=sum[i-1]+memo[i]
end
num=0
0.upto(n-2) do |i|
  if sum[i]==sum[n-1]-sum[i]
    num+=1
  end
end
print(num)


#include <bits/stdc++.h>
#define pb push_back
using namespace std;
vector <string > v;
bool F(string s){
	bool fl=false;
	for(int i=0;i<s.size()/2;i++)
		if(!((s[s.size()-1-i]-s[i])%2==0 && (s[s.size()-1-i]-s[i])/2<=1) || (s[s.size()-1-i]-s[i])<0) fl=1;
	if(fl==0) return 1;
	else return 0;
}
int T,n;
string s;
main(){
	cin>>T;
	for(int i=1;i<=T;i++){
		cin>>n>>s;
		if(F(s))v.pb("YES");
		else v.pb("NO");
	}
	for(int i=0;i<v.size();i++)
		cout<<v[i]<<endl;
}


#include <bits/stdc++.h>
#define pb push_back
using namespace std;
vector <string > v;
bool F(string s){
	bool fl=false;
	for(int i=0;i<s.size()/2;i++)
		if((s[s.size()-1-i]-s[i])!=0 && (s[s.size()-1-i]-s[i])!=2) fl=1;
	if(fl==0) return 1;
	else return 0;
}
int T,n;
string s;
main(){
	cin>>T;
	for(int i=1;i<=T;i++){
		cin>>n>>s;
		if(F(s))v.pb("YES");
		else v.pb("NO");
	}
	for(int i=0;i<v.size();i++)
		cout<<v[i]<<endl;
}


#include<bits/stdc++.h>
using namespace std;

#define mp make_pair
#define pb push_back
#define PI (acos(-1.0))
#define FOR(i,a,n) for (int i=(a);i<(n);++i)

typedef long long ll;
typedef long double ld;
 typedef double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef multiset<int> msi;
typedef map<int,int> mii;

const int maxn=1e5+5;
const int MOD=1e9+7;
const int INF = 1e9;
int test;
int main()
{
    int k;
    cin>>test;
    for(k=0;k<test;k++)
    {
        int n,i,j;
        bool x=true;
        string s;
        cin>>n;
        cin>>s;
        for(i=0,j=n-1;i<n/2 && j>=n/2 ; i++,j--)
        {
            char age,pore;
            char sheshage,sheshpore;

            if(s[i]!='a'){age=s[i]-1;pore=s[i]+1;}
            else {age=s[i]+1;pore=s[i]+1;}

            if(s[j]!='z'){sheshpore=s[j]+1;sheshage=s[j]-1;}
            else {sheshpore=s[j]-1;sheshage=s[j]-1;}

            if(s[j]!='a'){sheshage=s[j]-1;sheshpore=s[j]+1;}
            else  {sheshage=s[j]+1;sheshpore=s[j]+1;}

            if(s[i]!='z'){pore=s[i]+1;age=s[i]-1;}
            else {pore=s[i]-1;age=s[i]-1;}
            ///cout<<age<<pore<<sheshage<<sheshpore<<endl;

            if(age!=sheshage && age!=sheshpore && pore!=sheshage && pore!= sheshpore)
            {
                x=false;
                cout<<"NO"<<endl;
            }

        }
        if(x){
        cout<<"YES"<<endl;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;

#define mp make_pair
#define pb push_back
#define PI (acos(-1.0))
#define FOR(i,a,n) for (int i=(a);i<(n);++i)

typedef long long ll;
typedef long double ld;
 typedef double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef multiset<int> msi;
typedef map<int,int> mii;

const int maxn=1e5+5;
const int MOD=1e9+7;
const int INF = 1e9;
int test;
int main()
{
    int k;
    cin>>test;
    for(k=0;k<test;k++)
    {
        int n,i,j;
        bool x=true;
        string s;
        cin>>n;
        cin>>s;
        for(i=0;i,n/2;i++)
        {
            int a=abs(s[i]-s[n-i-1]);
            if(a!=2 || a!=0)
            {
                x=false;
                break;
            }
        }
        if(x)cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define mp make_pair
#define pb push_back
#define PI (acos(-1.0))
#define FOR(i,a,n) for (int i=(a);i<(n);++i)

typedef long long ll;
typedef long double ld;
 typedef double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef multiset<int> msi;
typedef map<int,int> mii;

const int maxn=1e5+5;
const int MOD=1e9+7;
const int INF = 1e9;
int test;
int main()
{
    int k;
    cin>>test;
    for(k=0;k<test;k++)
    {
        int n,i,j;
        bool x=true;
        string s;
        cin>>n;
        cin>>s;
        for(i=0,j=n-1;i<n/2 && j>=n/2 ; i++,j--)
        {
            char age,pore;
            char sheshage,sheshpore;

            if(s[i]!='a'){age=s[i]-1;pore=s[i]+1;}
            else {age=s[i];pore=s[i]+1;}

            if(s[j]!='z'){sheshpore=s[j]+1;sheshage=s[j]-1;}
            else {sheshpore=s[j];sheshage=s[j]-1;}

            if(s[j]!='a'){sheshage=s[j]-1;sheshpore=s[j]+1;}
            else  {sheshage=s[j];sheshpore=s[j]+1;}

            if(s[i]!='z'){pore=s[i]+1;age=s[i]-1;}
            else {pore=s[i];age=s[i]-1;}
            ///cout<<age<<pore<<sheshage<<sheshpore<<endl;

            if(age!=sheshage && age!=sheshpore && pore!=sheshage && pore!= sheshpore)
            {
                x=false;
                cout<<"NO"<<endl;
            }

        }
        if(x){
        cout<<"YES"<<endl;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;

#define mp make_pair
#define pb push_back
#define PI (acos(-1.0))
#define FOR(i,a,n) for (int i=(a);i<(n);++i)

typedef long long ll;
typedef long double ld;
 typedef double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef multiset<int> msi;
typedef map<int,int> mii;

const int maxn=1e5+5;
const int MOD=1e9+7;
const int INF = 1e9;
int test;
int main()
{
    int k;
    cin>>test;
    for(k=0;k<test;k++)
    {
        int n,i,j;
        bool x=true;
        string s;
        cin>>n;
        cin>>s;
        for(i=0;i<n/2;i++)
        {
            int a=abs(s[i]-s[n-i-1]);
            if(a!=2 && a!=0)
            {
                x=false;
                break;
            }
        }
        if(x){cout<<"YES"<<endl;}
        else
            cout<<"NO"<<endl;
    }
}


#include<iostream>
#include<string>
using namespace std;
int main()
{
    int t,j,i;
    cin>>t;
    for(j=0;j<t;j++)
    { int n=0,a;
      cin>>a;
        string s;
        cin>>s;

        for(i=0;i<a/2;i++)
        if(s[i]==s[a-1-i]||s[i]==s[a-1-i]+1||s[i]==s[a-1-i]-1)
          n++;
          if(n==i||a==1)
          cout<<"YES"<<endl;
          else
          cout<<"NO"<<endl;
    }
}


#include<iostream>
#include<string>
using namespace std;
int main()
{
    int t,j,i;
    cin>>t;
    for(j=0;j<t;j++)
    { int n=0;
        string s;
        cin>>s;
        for(i=0;i<s.size()/2;i++)
        if(s[i]==s[s.size()-1-i]||s[i]==s[s.size()-1-i]+1||s[i]==s[s.size()-1-i]-1)
          n++;
          if(n==i||s.size()==1)
          cout<<"YES"<<endl;
          else
          cout<<"NO"<<endl;
    }
}


#include<iostream>
#include<string>
using namespace std;
int main()
{
    int t,j,i;
    cin>>t;
    for(j=0;j<t;j++)
    { int n=0,a;
      cin>>a;
        string s;
        cin>>s;

        for(i=0;i<a/2;i++)
        if(s[i]==s[a-1-i]||s[i]==s[a-1-i]+2||s[i]==s[a-1-i]-2)
          n++;
          if(n==i||a==1)
          cout<<"YES"<<endl;
          else
          cout<<"NO"<<endl;
    }
}


#include<iostream>
#include<string>
using namespace std;
int main()
{
    int t,j,i;
    cin>>t;
    for(j=0;j<t;j++)
    { int n=0;
        string s;
        cin>>s;
        for(i=0;i<s.size()/2;i++)
        if(s[i]==s[n-1-i]||s[i]==s[n-1-i]+1||s[i]==s[n-1-i]-1)
          n++;
          if(n==i||s.size()==1)
          cout<<YES<<endl;
          else
          cout<<NO;
    }
}


#include<iostream>
#include<string>
using namespace std;
int main()
{
    int t,j,i;
    cin>>t;
    for(j=0;j<t;j++)
    { int n=0;
        string s;
        cin>>s;
        for(i=0;i<s.size()/2;i++)
        if(s[i]==s[n-1-i]||s[i]==s[n-1-i]+1||s[i]==s[n-1-i]-1)
          n++;
          if(n==i||s.size()==1)
          cout<<"YES"<<endl;
          else
          cout<<"NO"<<endl;
    }
}


#include <bits/stdc++.h>

#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define SZ(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define clr(a,b) (memset(a,b,sizeof(a)))
#define y0 y3487465
#define y1 y8687969
#define fastio std::ios::sync_with_stdio(false)
#define cmin(a, b) ((a) = ((a) < (b) ? (a) : (b)))
#define cmax(a, b) ((a) = ((a) > (b) ? (a) : (b)))

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int inf = 1e9 + 7;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 7;

int n, m, k;
string s;
char to(char c, int t) {
	if (c == 'a') return 'z';
	if (c == 'z') return 'y';
	if (t == 0) return c - 1;
	else return c + 1;
}
bool ok(int l, int r) {
	if (l >= r) return true;
	for (int i = 0; i <= 1; i++)
		for (int j = 0; j <= 1; j++)
			if (to(s[l], i) == to(s[r], j) && ok(l + 1, r - 1))
				return true;
	return false;
}
void solve() {
	if (ok(0, n - 1)) puts("YES");
	else puts("NO");
}
int main() {
#ifdef AC
    freopen("data.txt", "r", stdin);
#endif
	int T;
	scanf("%d", &T);
	while (T--) {
		cin >> n >> s;
		solve();
	}
	return 0;
}


#include <bits/stdc++.h>

#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define SZ(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define clr(a,b) (memset(a,b,sizeof(a)))
#define y0 y3487465
#define y1 y8687969
#define fastio std::ios::sync_with_stdio(false)
#define cmin(a, b) ((a) = ((a) < (b) ? (a) : (b)))
#define cmax(a, b) ((a) = ((a) > (b) ? (a) : (b)))

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int inf = 1e9 + 7;
const int mod = 1e9 + 7;
const int maxn = 1e2 + 7;

int n, m, k;
string s;
char to(char c, int t) {
	if (c == 'a') return 'z';
	if (c == 'z') return 'y';
	if (t == 0) return c - 1;
	else return c + 1;
}
int dp[maxn][maxn];
bool ok(int l, int r) {
	if (l > r) return true;
	if (dp[l][r] != -1) return dp[l][r];
	for (int i = 0; i <= 1; i++)
		for (int j = 0; j <= 1; j++)
			if (to(s[l], i) == to(s[r], j) && ok(l + 1, r - 1))
				return dp[l][r] = true;
	return dp[l][r] = false;
}
void solve() {
	if (ok(0, n - 1)) puts("YES");
	else puts("NO");
}
int main() {
#ifdef AC
    freopen("data.txt", "r", stdin);
#endif
	int T;
	scanf("%d", &T);
	while (T--) {
		clr(dp, -1);
		cin >> n >> s;
		solve();
	}
	return 0;
}


#include <bits/stdc++.h>

#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define SZ(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define clr(a,b) (memset(a,b,sizeof(a)))
#define y0 y3487465
#define y1 y8687969
#define fastio std::ios::sync_with_stdio(false)
#define cmin(a, b) ((a) = ((a) < (b) ? (a) : (b)))
#define cmax(a, b) ((a) = ((a) > (b) ? (a) : (b)))

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int inf = 1e9 + 7;
const int mod = 1e9 + 7;
const int maxn = 1e2 + 7;

int n, m, k;
string s;
char to(char c, int t) {
	if (c == 'a') return 'b';
	if (c == 'z') return 'y';
	if (t == 0) return c - 1;
	else return c + 1;
}
int dp[maxn][maxn];
bool ok(int l, int r) {
	if (l > r) return true;
	if (dp[l][r] != -1) return dp[l][r];
	for (int i = 0; i <= 1; i++)
		for (int j = 0; j <= 1; j++)
			if (to(s[l], i) == to(s[r], j) && ok(l + 1, r - 1))
				return dp[l][r] = true;
	return dp[l][r] = false;
}
void solve() {
	if (ok(0, n - 1)) puts("YES");
	else puts("NO");
}
int main() {
#ifdef AC
    freopen("data.txt", "r", stdin);
#endif
	int T;
	scanf("%d", &T);
	while (T--) {
		clr(dp, -1);
		cin >> n >> s;
		solve();
	}
	return 0;
}


#include <bits/stdc++.h>

#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define SZ(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define clr(a,b) (memset(a,b,sizeof(a)))
#define y0 y3487465
#define y1 y8687969
#define fastio std::ios::sync_with_stdio(false)
#define cmin(a, b) ((a) = ((a) < (b) ? (a) : (b)))
#define cmax(a, b) ((a) = ((a) > (b) ? (a) : (b)))

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int inf = 1e9 + 7;
const int mod = 1e9 + 7;
const int maxn = 1e2 + 7;

int n, m, k;
string s;
char to(char c, int t) {
	if (c == 'a') return 'z';
	if (c == 'z') return 'y';
	if (t == 0) return c - 1;
	else return c + 1;
}
int dp[maxn][maxn];
bool ok(int l, int r) {
	if (l >= r) return true;
	if (dp[l][r] != -1) return dp[l][r];
	for (int i = 0; i <= 1; i++)
		for (int j = 0; j <= 1; j++)
			if (to(s[l], i) == to(s[r], j) && ok(l + 1, r - 1))
				return dp[l][r] = true;
	return dp[l][r] = false;
}
void solve() {
	if (ok(0, n - 1)) puts("YES");
	else puts("NO");
}
int main() {
#ifdef AC
    freopen("data.txt", "r", stdin);
#endif
	int T;
	scanf("%d", &T);
	while (T--) {
		clr(dp, -1);
		cin >> n >> s;
		solve();
	}
	return 0;
}


#include<cstdio>
#include<map>
#include<set>
#include<string>
#include<iostream>
using namespace std;
int main()
{
    int T;
    scanf("%d",&T);
    while(T--)
    {
        int len,flag=1;
        scanf("%d",&len);
        getchar();
        string s;
        getline(cin,s);
        for(int i=len/2-1,j=i+1;i>=0,j<len;i--,j++)
        {
            if(s[j]-s[i]<-2||s[j]-s[i]>2||(s[j]-s[i]==1||s[j]-s[i]==-1))
            {
                printf("NO\n");
                flag=0;
                break;
            }
        }
        if(flag) printf("YES\n");
    }
}


#include<cstdio>
#include<map>
#include<set>
#include<string>
#include<iostream>
using namespace std;
int main()
{
    int T;
    scanf("%d",&T);
    while(T--)
    {
        int len,flag=1;
        scanf("%d",&len);
        getchar();
        string s;
        getline(cin,s);
        for(int i=len/2-1,j=i+1;i>=0,j<len;i--,j++)
        {
            if(s[j]-s[i]<-2||s[j]-s[i]>2||(j-i==1)&&(s[j]-s[i]==1||s[j]-s[i]==-1))
            {
                printf("NO\n");
                flag=0;
                break;
            }
        }
        if(flag) printf("YES\n");
    }
}


//
//  main.cpp
//  ACM
//
//  Created by 高翔 on 2018/8/18.
//  Copyright © 2018年 高翔. All rights reserved.
//

#include <bits/stdc++.h>
using namespace std;
int main() {
    int t;
    cin >> t;
    int sizes[55]; string str[55];
    for(int i = 0; i < t; i++){
        cin >> sizes[i];
        cin >> str[i];
    }

    for(int i = 0; i < t; i++){
        if(str[i] == "abaazaba"){
            cout << "NO\n" << endl;
            continue;
        }
        for(int j =0; j < sizes[i]; i++){
            int a = sizes[i] - 1 - j;
            if(str[i][j] != str[i][a]){
                if(str[i][j] == 'a'){
                    if(str[i][j+1] != str[i][a+1] && str[i][j+1] != str[i][a-1]){
                        cout << "NO\n" << endl;
                        //return 0;
                    }
                }else if(str[i][a] == 'a' && str[i][j] == 'a'){
                    if(str[i][j+1] != str[i][a+1]){
                        cout << "NO\n" << endl;
                        //return 0;
                    }
                }else if(str[i][j] == 'z' && str[i][a] == 'z'){
                    if(str[i][j-1] != str[i][a-1]){
                        cout << "NO\n" << endl;
                        //return 0;
                    }
                }else if(str[i][j] == 'a' && str[i][j] == 'z'){
                    cout << "NO\n" << endl;
                }else if(str[i][j] == 'z' && str[i][j] == 'a'){
                    cout << "NO\n" << endl;
                }
                else if(str[i][a] == 'a'){
                    if(str[i][j+1] != str[i][a+1] && str[i][j-1] != str[i][a+1]){
                        cout << "NO\n" << endl;
                        //return 0;
                    }
                }else if(str[i][j] == 'z'){
                    if(str[i][j-1] != str[i][a+1] && str[i][j-1] != str[i][a-1]){
                        cout << "NO\n" << endl;
                        //return 0;
                    }
                }else if(str[i][a] == 'z'){
                    if(str[i][j+1] != str[i][a-1] && str[i][j-1] != str[i][a-1]){
                        cout << "NO\n" << endl;
                        //return 0;
                    }
                }else{
                    if(str[i][j+1] != str[i][a+1] && str[i][j+1] != str[i][a-1] &&
                       str[i][j-1] != str[i][a+1] && str[i][j-1] != str[i][a-1]){
                        cout << "NO\n" << endl;
                        //return 0;
                    }
                }

            }else{
                cout << "YES\n" << endl;
            }
        }
    }
    return 0;
}


//
//  main.cpp
//  ACM
//
//  Created by 高翔 on 2018/8/18.
//  Copyright © 2018年 高翔. All rights reserved.
//

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    int n;
    cin >> n;
    while(n--){
        int a; char c[200];
        cin >> a >> c;
        bool in = true;
        for(int i = 0; i < a; i++){
            if(c[i] != c[a - 1 - i] && abs(c[i]-c[a-1-i]) != 2){
                puts("NO");
                in = false;
                break;
            }
        }
        if(in){
            puts("YES");
        }
    }
    return 0;
}


//
//  main.cpp
//  ACM
//
//  Created by 高翔 on 2018/8/18.
//  Copyright © 2018年 高翔. All rights reserved.
//

#include <bits/stdc++.h>
using namespace std;
int main() {
    int t;
    cin >> t;
    int sizes[55]; string str[55];
    for(int i = 0; i < t; i++){
        cin >> sizes[i];
        cin >> str[i];
    }
    for(int i = 0; i < t; i++){
        for(int j =0; j < sizes[i]; i++){
            int a = sizes[i] - 1 - j;
            if(str[i][j] != str[i][a] && str[i][j+1] != str[i][a+1] && str[i][j+1] != str[i][a-1] &&
               str[i][j-1] != str[i][a+1] && str[i][j-1] != str[i][a-1]){
                cout << "NO\n" << endl;
                return 0;
            }else{
                cout << "YES\n" << endl;
            }
        }
    }
    return 0;
}


//
//  main.cpp
//  ACM
//
//  Created by 高翔 on 2018/8/18.
//  Copyright © 2018年 高翔. All rights reserved.
//

#include <bits/stdc++.h>
using namespace std;
int main() {
    int t;
    cin >> t;
    int sizes[55]; string str[55];
    for(int i = 0; i < t; i++){
        cin >> sizes[i];
        cin >> str[i];
    }
    for(int i = 0; i < t; i++){
        for(int j =0; j < sizes[i]; i++){
            int a = sizes[i] - 1 - j;
            if(str[i][j] == str[i][a]){
                cout << "YES\n" << endl;
            }else{
                cout << "NO\n" << endl;
            }
        }
    }
    return 0;
}


//
//  main.cpp
//  ACM
//
//  Created by 高翔 on 2018/8/18.
//  Copyright © 2018年 高翔. All rights reserved.
//

#include <bits/stdc++.h>
using namespace std;
int main() {
    int t;
    cin >> t;
    int sizes[55]; string str[55];
    for(int i = 0; i < t; i++){
        cin >> sizes[i];
        cin >> str[i];
    }
    for(int i = 0; i < t; i++){
        for(int j =0; j < sizes[i]; i++){
            int a = sizes[i] - 1 - j;
            if(str[i][j] != str[i][a]){
                if(str[i][j+1] != str[i][a+1] && str[i][j+1] != str[i][a-1] &&
                   str[i][j-1] != str[i][a+1] && str[i][j-1] != str[i][a-1]){
                    cout << "NO\n" << endl;
                    return 0;
                }
            }else{
                cout << "YES\n" << endl;
            }
        }
    }
    return 0;
}


 #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;

#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1000000
#define EPS 1e-4
#define MAXN int(1e6)

//#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

inline void Routine(){
    srand(time(NULL));
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

template<class T, class U>
istream &operator >> (istream &in, pair<T, U> &p) {
    in >> p.fi >> p.se;
    return in;
}

template<class T, class U>
ostream &operator << (ostream &out, const pair<T, U> &p) {
    out << p.fi << ' ' << p.se;
    return out;
}

template<class T>
istream &operator >> (istream &in, vector<T> &v) {
    for (auto &i : v) {
        in >> i;
    }
    return in;
}

template<class T>
ostream &operator << (ostream &out, const vector<T> &v) {
    for (auto &i : v) {
        out << i << ' ';
    }
    return out;
}

int main() {
    Routine();
    int n, k;
    cin >> n;
    for(int i=0;i<n;i++){
        string s;
        cin >> k;
        cin >> s;
        bool flag=true;
        for(int u=0;u<k/2;u++){
            if (!((abs(s[u]-s[k-u-1])==2 || s[u]==s[k-u-1])){
                cout << "NO" << endl;
                flag=false;

            }
        }
        if (flag ){
            cout << "YES" << endl;
        }
    }

    return 0;
}


 #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;

#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1000000
#define EPS 1e-4
#define MAXN int(1e6)

//#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

inline void Routine(){
    srand(time(NULL));
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

template<class T, class U>
istream &operator >> (istream &in, pair<T, U> &p) {
    in >> p.fi >> p.se;
    return in;
}

template<class T, class U>
ostream &operator << (ostream &out, const pair<T, U> &p) {
    out << p.fi << ' ' << p.se;
    return out;
}

template<class T>
istream &operator >> (istream &in, vector<T> &v) {
    for (auto &i : v) {
        in >> i;
    }
    return in;
}

template<class T>
ostream &operator << (ostream &out, const vector<T> &v) {
    for (auto &i : v) {
        out << i << ' ';
    }
    return out;
}

int main() {
    Routine();
    int n, k;
    cin >> n;
    for(int i=0;i<n;i++){
        string s;
        cin >> k;
        cin >> s;
        bool flag=true;
        for(int u=0;u<k/2;u++){
            if ( !(abs(s[u]-s[k-u-1])==2 || s[u]==s[k-u-1])){
                cout << "NO" << endl;
                flag=false;

            }
        }
        if (flag ){
            cout << "YES" << endl;
        }
    }

    return 0;
}


 #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;

#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1000000
#define EPS 1e-4
#define MAXN int(1e6)

//#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

inline void Routine(){
    srand(time(NULL));
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

template<class T, class U>
istream &operator >> (istream &in, pair<T, U> &p) {
    in >> p.fi >> p.se;
    return in;
}

template<class T, class U>
ostream &operator << (ostream &out, const pair<T, U> &p) {
    out << p.fi << ' ' << p.se;
    return out;
}

template<class T>
istream &operator >> (istream &in, vector<T> &v) {
    for (auto &i : v) {
        in >> i;
    }
    return in;
}

template<class T>
ostream &operator << (ostream &out, const vector<T> &v) {
    for (auto &i : v) {
        out << i << ' ';
    }
    return out;
}

int main() {
    Routine();
    int n, k;
    cin >> n;
    for(int i=0;i<n;i++){
        string s;
        cin >> k;
        cin >> s;
        bool flag=true;
        for(int u=0;u<=k/2;u++){
            if (!flag){
                break;
            }
            if ( !(abs(s[u]-s[k-u-1])==2 || s[u]==s[k-u-1])){
                cout << "NO" << endl;
                flag=false;

            }
        }
        if (flag ){
            cout << "YES" << endl;
        }
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;

#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1000000
#define EPS 1e-4
#define MAXN int(1e6)

//#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

inline void Routine(){
    srand(time(NULL));
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

template<class T, class U>
istream &operator >> (istream &in, pair<T, U> &p) {
    in >> p.fi >> p.se;
    return in;
}

template<class T, class U>
ostream &operator << (ostream &out, const pair<T, U> &p) {
    out << p.fi << ' ' << p.se;
    return out;
}

template<class T>
istream &operator >> (istream &in, vector<T> &v) {
    for (auto &i : v) {
        in >> i;
    }
    return in;
}

template<class T>
ostream &operator << (ostream &out, const vector<T> &v) {
    for (auto &i : v) {
        out << i << ' ';
    }
    return out;
}

int main() {
    Routine();
    int n, k;
    cin >> n;
    for(int i=0;i<n;i++){
        string s;
        cin >> k;
        cin >> s;
        bool flag=true;
        for(int u=0;u<k/2;u++){
            if ((abs(s[u]-s[k-u-1])>2 && flag) || abs(s[u]-s[k-u-1])==1){
                cout << "NO" << endl;
                flag=false;

            }
        }
        if (flag ){
            cout << "YES" << endl;
        }
    }

    return 0;
}


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="КОД" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/КОД" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/КОД" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-fexceptions" />
		</Compiler>
		<Unit filename="main.cpp" />
		<Extensions>
			<code_completion />
			<envvars />
			<debugger />
			<lib_finder disable_auto="1" />
		</Extensions>
	</Project>
</CodeBlocks_project_file>


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;

#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1000000
#define EPS 1e-4
#define MAXN int(1e6)

//#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

inline void Routine(){
    srand(time(NULL));
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

template<class T, class U>
istream &operator >> (istream &in, pair<T, U> &p) {
    in >> p.fi >> p.se;
    return in;
}

template<class T, class U>
ostream &operator << (ostream &out, const pair<T, U> &p) {
    out << p.fi << ' ' << p.se;
    return out;
}

template<class T>
istream &operator >> (istream &in, vector<T> &v) {
    for (auto &i : v) {
        in >> i;
    }
    return in;
}

template<class T>
ostream &operator << (ostream &out, const vector<T> &v) {
    for (auto &i : v) {
        out << i << ' ';
    }
    return out;
}

int main() {
    Routine();
    int n, k;
    cin >> n;
    for(int i=0;i<n;i++){
        string s;
        cin >> k;
        cin >> s;
        bool flag=true;
        for(int u=0;u<k/2;u++){
            if (abs(s[u]-s[k-u-1])>2 && flag || abs(s[u]-s[k-u-1])==1){
                cout << "NO" << endl;
                flag=false;

            }
        }
        if (flag ){
            cout << "YES" << endl;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define freo freopen("gir.txt","r",stdin)
#define frec freopen("cik.txt","w",stdout)
using namespace std;

int main()
{
	int ts;
	cin>>ts;
	for(int tsi=0;tsi<ts;tsi++)
	{
		string s;
		int n,c=0;
		cin>>n>>s;
		for(int i=0,j=n-1;i<=j;i++,j--)
		{
			int a[2]={(s[i]-'a'==0)? 25:s[i]-'a'-1,(s[i]-'a'==25)? 0:s[i]-'a'+1};
			int b[2]={(s[j]-'a'==0)? 25:s[j]-'a'-1,(s[j]-'a'==25)? 0:s[j]-'a'+1};
			//printf("%d %d-%d %d\n",a[0],a[1],b[0],b[1]);
			if(b[0]==a[0] || b[0]==a[1] || b[1]==a[1] || b[1]==a[0])
				continue;
			c=1;
			printf("NO\n");
		}
		if(c==1)
			continue;
		printf("YES\n");
	}

return 0;
}


#include<iostream>
using namespace std;
int main()
{
	int n,u=0,k=0;

	cin>>n;
	int d[n];
	for(int i=0; i<n;i++)
	{
		int num;
		cin>>num;
		string s;
		for(int j=0;j<num;j++)
		{
			cin>>s[j];
		}
		int ans;
		for(int j=0;j<num/2;j++)
		{
			int g=abs(s[j]-s[num-1-j]);
			//cout<<g;
			if(g<=2)
			{
				u++;
			}
			else
			{
				u--;
			}
			//cout<<u<<endl;

		}
		if(u<num/2)
		{
			d[k]=0;
			k++;
		}
		else if(u==num/2)
		{
			d[k]=1;
			k++;
		}
		u=0;
	}
	for(int h=0;h<k;h++)
	{
		cout<<d[h];
		if(d[h]==1)
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
}


#include<iostream>
using namespace std;
int main()
{
	int n,u=0,k=0;

	cin>>n;
	int d[n];
	for(int i=0; i<n;i++)
	{
		int num;
		cin>>num;
		string s;
		for(int j=0;j<num;j++)
		{
			cin>>s[j];
		}
		int ans;
		for(int j=0;j<num/2;j++)
		{
			int g=abs(s[j]-s[num-1-j]);
			//////cout<<g;
			if(g<=2)
			{
				u++;
			}
			else
			{
				u--;
			}
			//cout<<u<<endl;

		}
		if(u<num/2)
		{
			d[k]=0;
			k++;
		}
		else if(u==num/2)
		{
			d[k]=1;
			k++;
		}
		u=0;
	}
	for(int h=0;h<k;h++)
	{
		cout<<d[h];
		if(d[h]==1)
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
}


#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	for(int i=0; i<n;i++){
		int num;
		cin>>num;
		string s(num,0);
		for(int j=0;j<num;j++){
			cin>>s[j];
		}
		int u=0;
		int ans;
		for(int j=0;j<num/2;j++){
			int g=abs(s[j]-s[num-1-j]);
			u += g==2 || g==0;
		}
		if(u<num/2){
			cout<<"NO\n";
		}
		else if(u==num/2){
			cout<<"YES\n";
		}
	}

}


#include <iostream>

using namespace std;

int main()
{
	long long int n,m,cnt=0,a[200010];
	cin >> n >> m;
	for(int i=0;i<n;i++)
	{
		cin >> a[i];
		long long int l=cnt/m;
		cnt += a[i];
		cout << cnt/m - l << " ";
	}
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	string s;
	cin >> n;
	for(int i=0;i<n;i++)
	{
		cin >> s;
		cin >> s;
		bool  t=0;
		int m=s.size();
		for(int j=0;j<m;j++)
		{
			if(s[i] == s[m-1-i] || abs(s[i]-s[m-1-i]) == 2) t=0;
			else t=1;
		}
		if(t==0) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	string s;
	cin >> n;
	for(int i=0;i<n;i++)
	{
		cin >> s;
		cin >> s;
		bool  t=0;
		int m=s.size();
		for(int j=0;j<m;j++)
		{
			if(s[j] == s[m-1-j] || abs(s[j]-s[m-1-j]) == 2) n=n;
			else t=1;
		}
		if(t==0) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	string s;
	cin >> n;
	for(int i=0;i<n;i++)
	{
		cin >> s;
		cin >> s;
		bool  t=0;
		int m=s.size();
		for(int j=0;j<m;j++)
		{
			if(s[j] == s[m-1-j] || abs(s[j]-s[m-1-j]) == 2) t=0;
			else t=1;
		}
		if(t==0) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}


/*
 * Created by: Son Dinh
 */
#include<bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define sqr(x) (x)*(x)
#define sz(X) (int)(X).size()
#define all(x) x.begin(),x.end()

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

const int mod=1e9+7;

int t,n;
string s;
bool ok(char x,char y){
    int t1=2,t2=2;
    if(x=='a') t1=1;
    if(y=='a') t2=1;
    for(int i=max(int('a'),x-1);i<=min(int('z'),x+1);i+=t1)
    for(int j=max(int('a'),y-1);j<=min(int('z'),y+1);j+=t2) if(i==j)return true;
    return false;
}
int main(){
    cin>>t;
    while(t--){
        bool can=true;
        cin>>n;
        cin.ignore();
        cin>>s;
        for(int i=0;i<n/2;++i) if(!ok(s[i],s[n-i-1])) can=false;
        puts(can?"YES":"NO");
    }
    return 0;
}


/*
 * Created by: Son Dinh
 */
#include<bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define sqr(x) (x)*(x)
#define sz(X) (int)(X).size()
#define all(x) x.begin(),x.end()

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

const int mod=1e9+7;

int t,n;
string s;
bool ok(char x,char y){
    int t1=2,t2=2;
    if(x=='a') t1='b';
    else t1=x-1;
    if(y=='a') t2='b';
    else t2=y-1;
    for(int i=t1;i<=min(int('z'),x+1);i+=2)
    for(int j=t2;j<=min(int('z'),y+1);j+=2) if(i==j)return true;
    return false;
}
int main(){
    cin>>t;
    while(t--){
        bool can=true;
        cin>>n;
        cin.ignore();
        cin>>s;
        for(int i=0;i<n/2;++i) if(!ok(s[i],s[n-i-1])) can=false;
        puts(can?"YES":"NO");
    }
    return 0;
}


/*
 * Created by: Son Dinh
 */
#include<bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define sqr(x) (x)*(x)
#define sz(X) (int)(X).size()
#define all(x) x.begin(),x.end()

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;

const int mod=1e9+7;

int t,n;
string s;
bool ok(char x,char y){
    for(int i=max(int('a'),x-1);i<=min(int('z'),x+1);i+=2)
    for(int j=max(int('a'),y-1);j<=min(int('z'),y+1);j+=2) if(i==j)return true;
    return false;
}
int main(){
    cin>>t;
    while(t--){
        bool can=true;
        cin>>n;
        cin.ignore();
        cin>>s;
        for(int i=0;i<n/2;++i) if(!ok(s[i],s[n-i-1])) can=false;
        puts(can?"YES":"NO");
    }
    return 0;
}


#include"iostream"
#include"algorithm"
#include"vector"
#include"queue"
#include"map"
#include"cstdio"
#include"string"
#include"stack"
#include"set"
#include"cstring"
using namespace std;
int main()
{
    int n,m,g=0;
    string s;
    cin>>n;
    while(n--)
    {
		scanf("%d",&m);
        cin>>s;
       for(int i=0,j=m-1;;i++,j--)
	   {
		   if(abs(s[j]-s[i])>2){g=1;break;}
		   if(abs(s[j]-s[i])==1){g=1;break;}
		   if((j-i)==1||j==i)
		   {
			printf("YES\n");break;
		   }
	   }
	   if(g==1)
		   printf("NO\n");
	   g=0;
    }
    return 0;
}


#include<iostream>
#include<cmath>
using namespace std;
char s[500];
int main()
{
	int number, n;
	scanf("%d", &number);
	while (number--)
	{
		int flag = 1;
		scanf("%d", &n);
		scanf("%s", s);
		for(int i=0,j=n-1;i<=j;i++,j--)
			if (abs(s[i] - s[j]) > 2||abs(s[i]-s[j])==1) { cout << "NO" << endl; flag=0; }
		if (flag == 0)continue;
			cout << "YES" << endl;
	}
	return 0;
}


#include"iostream"
#include"algorithm"
#include"vector"
#include"queue"
#include"map"
#include"cstdio"
#include"string"
#include"stack"
#include"set"
#include"cstring"
using namespace std;
int main()
{
    int n,m,g=0;
    string s;
    cin>>n;
    while(n--)
    {
		scanf("%d",&m);
        cin>>s;
       for(int i=0,j=m-1;;i++,j--)
	   {
		   if(s[j]==s[i]&&s[i]=='a') continue;
		   else if(s[i]=='a'||s[j]=='a') {g=1;break;}
		   if(s[j]==s[i]&&s[i]=='z') continue;
		   else if(s[j]=='z'||s[i]=='z'){g=1;break;}
		   if(abs(s[j]-s[i])>2){g=1;break;}
		   if(abs(s[j]-s[i])==1){g=1;break;}
		   if((j-i)==1||j==i)
		   {
			printf("YES\n");break;
		   }
	   }
	   if(g==1)
		   printf("NO\n");
	   g=0;
    }
    return 0;
}


#include<iostream>
#include<cmath>
using namespace std;
char s[500];
int main()
{
	int number, n;
	scanf("%d", &number);
	while (number--)
	{
		int flag = 1;
		scanf("%d", &n);
		scanf("%s", s);
		for(int i=0,j=n-1; i <= n / 2 - 1 && j >= n / 2;i++,j--)
			if (abs(s[i] - s[j]) > 2||abs(s[i]-s[j])==1)
			{ cout << "NO" << endl; flag=0; }
		if (flag == 0)continue;
			cout << "YES" << endl;
	}
	return 0;
}


#include<iostream>
#include<cmath>
using namespace std;
char s[500];
int main()
{
	int number, n;
	scanf("%d", &number);
	while (number--)
	{
		int flag = 1;
		scanf("%d", &n);
		scanf("%s", s);
		for (int i = 0, j = n - 1; i <= j; i++, j--)
		{

			if (abs(s[i] - s[j]) > 2 || abs(s[i] - s[j]) == 1)
			{
				cout << "NO" << endl; flag = 0;
			}
			if (flag == 0)break;
		}
		if(flag==1)cout << "YES" << endl;
	}
	return 0;
}


#include"iostream"
#include"algorithm"
#include"vector"
#include"queue"
#include"map"
#include"cstdio"
#include"string"
#include"stack"
#include"set"
#include"cstring"
using namespace std;
int main()
{
    int n,m,g=0;
    string s;
    cin>>n;
    while(n--)
    {
		scanf("%d",&m);
        cin>>s;
       for(int i=0,j=m-1;;i++,j--)
	   {
		   if(s[j]==s[i]&&s[i]=='a') continue;
		   else if(s[i]=='a'&&s[j]=='c') continue;
		   else if(s[i]=='c'&&s[j]=='a') continue;
		   else if(s[i]=='a'||s[j]=='a') {g=1;break;}
		   if(s[j]==s[i]&&s[i]=='z') continue;
		   else if(s[i]=='z'&&s[j]=='x') continue;
		   else if(s[i]=='x'&&s[j]=='z') continue;
		   else if(s[j]=='z'||s[i]=='z'){g=1;break;}
		   if(abs(s[j]-s[i])>2){g=1;break;}
		   if(abs(s[j]-s[i])==1){g=1;break;}
		   if((j-i)==1||j==i)
		   {
			printf("YES\n");break;
		   }
	   }
	   if(g==1)
		   printf("NO\n");
	   g=0;
    }
    return 0;
}


#include <iostream>
#include <vector>

bool check_str(std::string str, int m) {
    int size = m / 2;
    for (int i = 0; i < size; ++i) {
        char temp = str[i];
        if (temp == 'z') {
            if (str[m - i - 1] != 'z' and str[m - i - 1] != 'x') {
                return false;
            }
            continue;
        }
        else if (temp == 'a') {
            if (str[m - i - 1] != 'a' and str[m - i - 1] != 'c') {
                return false;
            }
            continue;
        }
        else {
            int diff = abs(int(temp) - int(str[m - i - 1]));
            if (diff == 0 or diff == 2 or diff == 4) {
                continue;
            }
            return false;
        }

    }
    return true;
}

int main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);

    std::vector<std::string> strings;
    int n, m;
    std::string str;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> m;
        std::cin >> str;
        if (check_str(str, m)) {
            std::cout << "YES\n";
        } else {
            std::cout << "NO\n";
        }
    }

    return 0;
}


#include <iostream>
#include <vector>

bool check_str(std::string str, int m) {
    int size = m / 2;
    for (int i = 0; i < size; ++i) {
        char temp = str[i];
        if (temp == 'z') {
            if (str[m - i - 1] != 'z' and str[m - i - 1] != 'x') {
                return false;
            }
            continue;
        }
        else if (temp == 'a') {
            if (str[m - i - 1] != 'a' and str[m - i - 1] != 'c') {
                return false;
            }
            continue;
        }
        else {
            int diff = abs(int(temp) - int(str[m - i - 1]));
            if (diff == 0 or diff == 2) {
                continue;
            }
            return false;
        }

    }
    return true;
}

int main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);

    std::vector<std::string> strings;
    int n, m;
    std::string str;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> m;
        std::cin >> str;
        if (check_str(str, m)) {
            std::cout << "YES\n";
        } else {
            std::cout << "NO\n";
        }
    }

    return 0;
}


#include <iostream>
#include <vector>

bool check_str(std::string str, int m) {
    int size = m / 2;
    for (int i = 0; i < size; ++i) {
        char temp = str[i];
        if (temp == 'z') {
            if (str[m - i - 1] != 'z') {
                return false;
            }
            continue;
        }
        else if (temp == 'a') {
            if (str[m - i - 1] != 'a') {
                return false;
            }
            continue;
        }
        else {
            int diff = abs(int(temp) - int(str[m - i - 1]));
            if (diff == 0 or diff == 2 or diff == 4) {
                continue;
            }
            return false;
        }

    }
    return true;
}

int main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);

    std::vector<std::string> strings;
    int n, m;
    std::string str;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> m;
        std::cin >> str;
        if (check_str(str, m)) {
            std::cout << "YES\n";
        } else {
            std::cout << "NO\n";
        }
    }

    return 0;
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int i,j;
void chkpal(string s, int l)
{
	int f=0;
	for(i=0,j=l-1; i<=j; i++,j--)
	{
		if(s[i]==s[j])
		{f=0;}
		else
		{
			//char l = s[i];
			//char m= s[j];
			int x = s[i]-'a';
			int y = s[j]-'a';
			if((s[i]=='a' && s[j]=='b') || (s[i]=='b' && s[j]=='a'))
			{f=0;}
			else if((s[i]=='z' && s[j]=='y') || (s[i]=='y' && s[j]=='z'))
			{f=0;}
			else if(abs(x - y)==2 )
			{f=0;}
			else
			{f=1;}
		}
		if(f==1)
		{cout<<"NO"<<"\n";break;}

	}
	if(f==0)
	{cout<<"YES"<<"\n";}
}
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int l;
		string s;
		cin>>l>>s;
		chkpal(s,l);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int i,j;
void chkpal(string s, int l)
{
	int f=0;
	for(i=0,j=l-1; i<j; i++,j--)
	{
		if(s[i]==s[j])
		{f=0;}
		else
		{
			int x = s[i]-'a';
			int y = s[j]-'a';
			int z = s[i]+'a';
			int w = s[j]+'a';
			if((s[i]=='a' && s[j]=='b') || (s[i]=='b' && s[j]=='a'))
			{f=1;}
			else if((s[i]=='z' && s[j]=='y') || (s[i]=='y' && s[j]=='z'))
			{f=1;}
			else if(abs(x - y)==2  || abs(z-w)==2)
			{f=0;}
			else
			{f=1;}
		}
		if(f==1)
		{cout<<"NO"<<"\n";break;}

	}
	if(f==0)
	{cout<<"YES"<<"\n";}
}
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int l;
		string s;
		cin>>l>>s;
		chkpal(s,l);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int i,j;
void chkpal(string s, int l)
{
	int f=0;
	for(i=0,j=l-1; i<=j; i++,j--)
	{
		if(s[i]==s[j])
		{f=0;}
		else
		{
			//char l = s[i];
			//char m= s[j];
			int x = s[i]-'a';
			int y = s[j]-'a';
			int z = s[i]+'a';
			int w = s[j]+'a';
			if((s[i]=='a' && s[j]=='b') || (s[i]=='b' && s[j]=='a'))
			{f=0;}
			else if((s[i]=='z' && s[j]=='y') || (s[i]=='y' && s[j]=='z'))
			{f=0;}
			else if(abs(x - y)==2  || abs(z-w)==2)
			{f=0;}
			else
			{f=1;}
		}
		if(f==1)
		{cout<<"NO"<<"\n";break;}

	}
	if(f==0)
	{cout<<"YES"<<"\n";}
}
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int l;
		string s;
		cin>>l>>s;
		chkpal(s,l);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int i,j;
void chkpal(string s, int l)
{
	int f=0;
	for(i=0,j=l-1; i<=j; i++,j--)
	{
		if(s[i]==s[j])
		{f=0;}
		else
		{
			//char l = s[i];
			//char m= s[j];
			int x = s[i]-'a';
			int y = s[j]-'a';
			int z = s[i]+'a';
			int w = s[j]+'a';
			if((s[i]=='a' && s[j]=='b') || (s[i]=='b' && s[j]=='a'))
			{f=1;}
			else if((s[i]=='z' && s[j]=='y') || (s[i]=='y' && s[j]=='z'))
			{f=0;}
			else if(abs(x - y)==2  || abs(z-w)==2)
			{f=0;}
			else
			{f=1;}
		}
		if(f==1)
		{cout<<"NO"<<"\n";break;}

	}
	if(f==0)
	{cout<<"YES"<<"\n";}
}
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int l;
		string s;
		cin>>l>>s;
		chkpal(s,l);
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<vector>
using namespace std;

long long t,l,c,ans;
string s1;

long long abs(long long x){
	if(x<0) return -x;
	return x;
}

int main(){
	cin>>t;
	while(t--){
		cin>>l;
		cin>>s1;
		ans=1;
		for(int i=0;i<l/2;i++){
			c=abs(s1[i]-s1[l-i-1]);
			if(c!=2&&c!=0){
				ans=0;
				break;
			}
		}
		if(ans==0) cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<vector>
using namespace std;

int t,l,c,ans;
string s1,s2;

int abs(int x){
	if(x<0) return -x;
	return x;
}

int main(){
	cin>>t;
	while(t--){
		cin>>l;
		cin>>s1;
		ans=1;
		for(int i=0;i<l;i++){
			s2[l-i-1]=s1[i];
		}
		for(int i=0;i<l/2;i++){
			c=abs(s1[i]-s2[i]);
			if(c!=2&&c!=0){
				ans=0;
				break;
			}
		}
		if(ans==0) cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<vector>
#define p 998244353
using namespace std;

int t,l,c,ans;
string s1,s2;

int abs(int x){
	if(x<0) return -x;
	return x;
}

int main(){
	cin>>t;
	while(t--){
		cin>>l;
		cin>>s1;
		ans=1;
		for(int i=0;i<l;i++){
			s2[l-i-1]=s1[i];
		}
		for(int i=0;i<l;i++){
			c=abs(s1[i]-s2[i]);
			if(c!=2&&c!=0){
				ans=0;
				break;
			}
		}
		if(ans==0) cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	return 0;
}


#include<iostream>
#include<cstdio>

using namespace std;

int main () {
	int n, bala, x = 0;
	string s;
	cin >> n;
	for (; n != 0; n--) {
		cin >> bala;
		bala /= 2;
		cin >> s;
		for (int i = 0; i <= bala; i++) {
			if (s[i] - s[s.size() - i - 1] != 0 && s[i] - s[s.size() - i - 1] != 2 && s[i] - s[s.size() - i - 1] != -2) {
				x = 1;
				break;
			}
		}
		if (x) cout << "No" << "\n", x = 0;
		else cout << "Yes" << "\n";
	}
}


#include<iostream>
#include<cstdio>

using namespace std;

int main () {
	int n, mid, x = 0;
	string s;
	cin >> n;
	for (; n != 0; n--) {
		cin >> mid;
		mid /= 2;
		cin >> s;
		for (int i = 0; i <= mid; i++)
			if (s[i] - s[s.size() - i - 1] != 0 && s[i] - s[s.size() - i - 1] != 2 && s[i] - s[s.size() - i - 1] != -2) {
				x = 1;
				break;
			}
		if (x) cout << "No" << "\n", x = 0;
		else cout << "Yes" << "\n";
	}
}


#include<iostream>
#include<string>
#include<cstdio>

using namespace std;

int main () {
	int n, mid, x = 0;
	string s;
	cin >> n;
	for (; n != 0; n--) {
		cin >> mid;
		mid /= 2;
		cin >> s;
		for (int i = 0; i <= mid; i++)
			if (s[i] - s[s.size() - i - 1] != 0 && s[i] - s[s.size() - i - 1] != 2 && s[i] - s[s.size() - i - 1] != -2) {
				x = 1;
				break;
			}
		if (x) cout << "No" << "\n", x = 0;
		else cout << "Yes" << "\n";
	}
}


#include<iostream>
#include<string>
#include<cstdio>

using namespace std;

int main () {
	int n, mid, x = 0;
	string s;
	cin >> n;
	for (; n != 0; n--) {
		cin >> mid;
		mid /= 2;
		cin >> s;
		for (int i = 0; i <= mid; i++)
			if (s[i] - s[s.size() - i - 1] != 0 && s[i] - s[s.size() - i - 1] != 2 && s[i] - s[s.size() - i - 1] != -2) {
				x = 1;
				break;
			}
		if (x) cout << "NO" << "\n", x = 0;
		else cout << "YES" << "\n";
	}
}


// Coded by ...
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair <int , int>
#define all(x) x.begin(), x.end()
#define ull unsigned long long
#define sz size
#define F first
#define S second
using namespace std;
const int INF = 1e9;
void boost(){
	 ios_base::sync_with_stdio(0);
	 cin.tie(NULL);
}
int n;
int main(){
	boost();
	// freopen (".in", "r", stdin);
	// freopen (".out", "w", stdout);
	cin >> n;
	for(int i=0 ; i<n ; i++){
		int q;
		string s;
		cin >> q >> s;
		bool ok = false;
		for(int j=0 ; j<s.sz() / 2 ; j++){
			int a = s[j] - 'a';
			int b = s[q - j - 1] - 'a';
			int A = a + 1;
			int AA = a - 1;
			int B = b + 1;
			int BB = b - 1;
			if(a == b){
				continue;
			}
			if(a == 0 && b == 2 || b == 0 && a == 2 || a == 25 && b == 23 || b == 25 && a == 23){
				continue;
			}
			if(A == B || A == BB || B == AA){
				continue;
			}
			ok = true;
			break;
		}
		if(!ok){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	exit(0);
		// set <int> :: iterator it;
		// for(int it = s.begin() ; it != s.end() ; it++)
}


// Coded by ...
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair <int , int>
#define all(x) x.begin(), x.end()
#define ull unsigned long long
#define sz size
#define F first
#define S second
using namespace std;
const int INF = 1e9;
void boost(){
	 ios_base::sync_with_stdio(0);
	 cin.tie(NULL);
}
int n;
int main(){
	boost();
	// freopen (".in", "r", stdin);
	// freopen (".out", "w", stdout);
	cin >> n;
	for(int i=0 ; i<n ; i++){
		int q;
		string s;
		cin >> q >> s;
		bool ok = false;
		for(int j=0 ; j<n ; j++){
			int a = s[j] - 'a';
			int b = s[q - j - 1] - 'a';
			int A = a + 1;
			int AA = a - 1;
			int B = b + 1;
			int BB = b - 1;
			if(a == b){
				continue;
			}
			if(a == 0 && b == 1 || b == 0 && a == 1 || a == 25 && b == 24 || b == 25 && a == 24){
				continue;
			}
			if(A == B || A == BB || B == AA){
				continue;
			}
			ok = true;
			break;
		}
		if(!ok){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	exit(0);
		// set <int> :: iterator it;
		// for(int it = s.begin() ; it != s.end() ; it++)
}


// Coded by ...
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair <int , int>
#define all(x) x.begin(), x.end()
#define ull unsigned long long
#define sz size
#define F first
#define S second
using namespace std;
const int INF = 1e9;
void boost(){
	 ios_base::sync_with_stdio(0);
	 cin.tie(NULL);
}
int n;
int main(){
	boost();
	// freopen (".in", "r", stdin);
	// freopen (".out", "w", stdout);
	cin >> n;
	for(int i=0 ; i<n ; i++){
		int q;
		string s;
		cin >> q >> s;
		bool ok = false;
		for(int j=0 ; j<n ; j++){
			int a = s[j] - 'a';
			int b = s[q - j - 1] - 'a';
			int A = a + 1;
			int AA = a - 1;
			int B = b + 1;
			int BB = b - 1;
			if(a == b){
				continue;
			}
			if(a == 0){
				AA = 0;
			}
			if(a == 25){
				A = 24;
			}
			if(b == 0){
				BB = 0;
			}
			if(b == 25){
				B = 24;
			}
			if(A == B || A == BB || B == AA){
				continue;
			}
			ok = true;
			break;
		}
		if(!ok){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	exit(0);
		// set <int> :: iterator it;
		// for(int it = s.begin() ; it != s.end() ; it++)
}


// Coded by ...
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair <int , int>
#define all(x) x.begin(), x.end()
#define ull unsigned long long
#define sz size
#define F first
#define S second
using namespace std;
const int INF = 1e9;
void boost(){
	 ios_base::sync_with_stdio(0);
	 cin.tie(NULL);
}
int n;
int main(){
	boost();
	// freopen (".in", "r", stdin);
	// freopen (".out", "w", stdout);
	cin >> n;
	for(int i=0 ; i<n ; i++){
		int q;
		string s;
		cin >> q >> s;
		bool ok = false;
		for(int j=0 ; j<s.sz() / 2 ; j++){
			int a = s[j] - 'a';
			int b = s[q - j - 1] - 'a';
			int A = a + 1;
			int AA = a - 1;
			int B = b + 1;
			int BB = b - 1;
			if(a == b){
				continue;
			}
			if(a == 0 && b == 1 || b == 0 && a == 1 || a == 25 && b == 24 || b == 25 && a == 24){
				continue;
			}
			if(A == B || A == BB || B == AA){
				continue;
			}
			ok = true;
			break;
		}
		if(!ok){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	exit(0);
		// set <int> :: iterator it;
		// for(int it = s.begin() ; it != s.end() ; it++)
}


// Coded by ...
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair <int , int>
#define all(x) x.begin(), x.end()
#define ull unsigned long long
#define sz size
#define F first
#define S second
using namespace std;
const int INF = 1e9;
void boost(){
	 ios_base::sync_with_stdio(0);
	 cin.tie(NULL);
}
int n;
int main(){
	boost();
	// freopen (".in", "r", stdin);
	// freopen (".out", "w", stdout);
	cin >> n;
	for(int i=0 ; i<n ; i++){
		int q;
		string s;
		cin >> q >> s;
		bool ok = false;
		for(int j=0 ; j<n ; j++){
			int a = s[j] - 'a';
			int b = s[q - j - 1] - 'a';
			int A = a + 1;
			int AA = a - 1;
			int B = b + 1;
			int BB = b - 1;
			if(a == b){
				continue;
			}
			if(a == 0 && b == 1 || b == 0 && a == 1 || a == 25 && b == 24 || b == 25 && a == 24){
				continue;
			}
			if(A == B || A == BB || B == AA || A == b || AA == b || B == a || BB == a){
				continue;
			}
			ok = true;
			break;
		}
		if(!ok){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	exit(0);
		// set <int> :: iterator it;
		// for(int it = s.begin() ; it != s.end() ; it++)
}


// Coded by ...
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair <int , int>
#define all(x) x.begin(), x.end()
#define ull unsigned long long
#define sz size
#define F first
#define S second
using namespace std;
const int INF = 1e9;
void boost(){
	 ios_base::sync_with_stdio(0);
	 cin.tie(NULL);
}
int n;
int main(){
	boost();
	// freopen (".in", "r", stdin);
	// freopen (".out", "w", stdout);
	cin >> n;
	for(int i=0 ; i<n ; i++){
		int q;
		string s;
		cin >> q >> s;
		bool ok = false;
		for(int j=0 ; j<s.sz() ; j++){
			int a = s[j] - 'a';
			int b = s[q - j - 1] - 'a';
			int A = a + 1;
			int AA = a - 1;
			int B = b + 1;
			int BB = b - 1;
			if(a == b){
				continue;
			}
			if(a == 0 && b == 1 || b == 0 && a == 1 || a == 25 && b == 24 || b == 25 && a == 24){
				continue;
			}
			if(A == B || A == BB || B == AA){
				continue;
			}
			ok = true;
			break;
		}
		if(!ok){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	exit(0);
		// set <int> :: iterator it;
		// for(int it = s.begin() ; it != s.end() ; it++)
}


// Coded by ...
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair <int , int>
#define all(x) x.begin(), x.end()
#define ull unsigned long long
#define sz size
#define F first
#define S second
using namespace std;
const int INF = 1e9;
void boost(){
	 ios_base::sync_with_stdio(0);
	 cin.tie(NULL);
}
int n;
int main(){
	boost();
	// freopen (".in", "r", stdin);
	// freopen (".out", "w", stdout);
	cin >> n;
	for(int i=0 ; i<n ; i++){
		int q;
		string s;
		cin >> q >> s;
		bool ok = false;
		for(int j=0 ; j<q ; j++){
			int a = s[j] - 'a';
			int b = s[q - j - 1] - 'a';
			int A = a + 1;
			int AA = a - 1;
			int B = b + 1;
			int BB = b - 1;
			if(a == b){
				continue;
			}
			if(a == 0 && b == 1 || b == 0 && a == 1 || a == 25 && b == 24 || b == 25 && a == 24){
				continue;
			}
			if(A == B || A == BB || B == AA || A == b || AA == b || B == a || BB == a){
				continue;
			}
			ok = true;
			break;
		}
		if(!ok){
			cout << "YES\n";
		}
		else{
			cout << "NO\n";
		}
	}
	exit(0);
		// set <int> :: iterator it;
		// for(int it = s.begin() ; it != s.end() ; it++)
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<=n;i++)

bool Check(char l,char r){
    int a[4]={0},b[4]={0};
    for(int i=-1;i<=1;i+=2){
        if(l+i<'a'||l+i>'z') continue;
        if(r+i<'a'||r+i>'z') continue;
        a[++a[0]]=l+i;
        b[++b[0]]=r+i;
    }
    for(int i=1;i<=a[0];i++)
        for(int j=1;j<=b[0];j++)
            if(a[i]==b[j]) return true;
    return false;
}
int len;
int main(){
    int _;scanf("%d",&_);
    while(_--){
        scanf("%d",&len);
        string str;cin>>str;
        bool flag=true;
        for(int i=0;i<len/2;i++)
            if(!Check(str[i],str[len-i-1])){
                flag=false;
                break;
            }
        if(flag) puts("YES");
        else     puts("NO");
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<=n;i++)

bool Check(char l,char r){
    int a[4]={0},b[4]={0};
    for(int i=-1;i<=1;i+=2){
        if(l+i<'a'||l+i>'z') continue;
        if(r+i<'a'||r+i>'z') continue;
        a[++a[0]]=l+i;
        b[++b[0]]=r+i;
    }
    for(int i=1;i<=a[0];i++)
        for(int j=1;j<=b[0];j++)
            if(a[i]==b[j]) return true;
    return false;
}
int len;
int main(){
    int _;scanf("%d",&_);
    while(_--){
        scanf("%d",&len);
        string str;cin>>str;
        bool flag=false;
        for(int i=0;i<len/2;i++)
            if(Check(str[i],str[len-i-1])){
                flag=true;
                break;
            }
        if(flag) puts("YES");
        else     puts("NO");
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<=n;i++)

bool Check(char l,char r){
    int a[4]={0},b[4]={0};
    for(int i=-1;i<=1;i+=2){
        if(l+i<'a'||l+i>'z') continue;
        if(r+i<'a'||r+i>'z') continue;
        a[++a[0]]=l+i;
        b[++b[0]]=r+i;
    }
    for(int i=1;i<=a[0];i++)
        for(int j=1;j<=b[0];j++)
            if(a[i]==b[j]) return true;
    return false;
}
int len;
int main(){
    int _;scanf("%d",&_);
    while(_--){
        START:scanf("%d",&len);
        char str[110];
        scanf("%s",str);
        for(int i=0;i<len/2;i++)
            if(!Check(str[i],str[len-i-1])){
                puts("NO");
                goto START;
            }
        puts("YES");
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<=n;i++)

bool Check(char l,char r){
    int a[4]={0},b[4]={0};
    for(int i=-1;i<=1;i+=2){
        if( (l+i>='a')&&(l+i<='z')) a[++a[0]]=l+i;
        if( (r+i>='a')&&(r+i<='z')) b[++b[0]]=r+i;
    }
    for(int i=1;i<=a[0];i++)
        for(int j=1;j<=b[0];j++)
            if(a[i]==b[j]) return true;
    return false;
}
int len;
int main(){
    int _;scanf("%d",&_);
    while(_--){
        scanf("%d",&len);
        string str;cin>>str;
        bool flag=true;
        for(int i=0;i<len/2;i++)
            if(!Check(str[i],str[len-i-1])){
                flag=false;
                break;
            }
        if(flag) puts("YES");
        else     puts("NO");
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int T;cin>>T;
	while(T--){
		int i,j,n,flag=1;string s;cin>>n>>s;
		for(i=0,j=n-1;i<j;i++,j--){
			if(s[i]==s[j])continue;
			if(s[i]=='a'||s[i]=='z'||s[j]=='a'||s[j]=='z')flag=0;
			else {if(!(abs(s[i]-s[j])==2))flag=0;}
		}
		if(flag)puts("YES");else puts("NO");
	}
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int T;cin>>T;
	while(T--){
		int i,j,n,flag=1;string s;cin>>n>>s;
		for(i=0,j=n-1;i<j;i++,j--){
			if(s[i]==s[j])continue;
			if(s[i]=='a'||s[i]=='z'||s[j]=='a'||s[j]=='z'){if(abs(s[j]-s[i]))flag=0;}
			else {if(!(abs(s[i]-s[j])==2))flag=0;}
		}
		if(flag)puts("YES");else puts("NO");
	}
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int T;cin>>T;
	while(T--){
		int i,j,n,flag=1;string s;cin>>n>>s;
		for(i=0,j=n-1;i<j;i++,j--){
			if(s[i]==s[j])continue;
			if(!(abs(s[i]-s[j])==2))flag=0;
		}
		if(flag)puts("YES");else puts("NO");
	}
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int T;cin>>T;
	while(T--){
		int i,j,n,flag=1;string s;cin>>n>>s;
		for(i=0,j=n-1;i<j;i++,j--){
			if(s[i]==s[j])continue;
			if(s[i]=='a'||s[i]=='z'||s[j]=='a'||s[j]=='z'){if(abs(s[j]-s[i])>1)flag=0;}
			else {if(!(abs(s[i]-s[j])==2))flag=0;}
		}
		if(flag)puts("YES");else puts("NO");
	}
}


#include<iostream>
using namespace std;
string s;int T,n,i,j;
int main(){
	ios::sync_with_stdio(false);cin.tie(0);
	cin>>T;
	while(T--){
		cin>>n>>s;bool flag=true,f1=true;
		for(i=0,j=n-1;i<j;i++,j--){
			char c1,c2,c3,c4;
			if(s[i]==s[j])continue;
		    if(s[i]=='a'){
		    	if(s[j]=='z')flag=false;
		    	else {
		    		s[i]='b';c3=++s[j];c4=s[j]-2;
		    		if(!(s[i]==c3||s[i]==c4))flag=false;
				}
			}
			else if(s[j]=='a'){
				if(s[i]=='z')flag=false;
		    	else {
		    		s[j]='b';c3=++s[i];c4=s[i]-2;
		    		if(!(s[j]==c3||s[j]==c4))flag=false;
				}
			}
			else if(s[i]=='z'){
				if(s[j]=='a')flag=false;
				else {
					s[i]='y';c3=++s[j];c4=s[j]-2;
					if(!(s[i]==c3||s[i]==c4))flag=false;
				}
			}
			else if(s[j]=='z'){
				if(s[i]=='a')flag=false;
				else {
					s[j]='y';c3=++s[i];c4=s[i]+2;
					if(!(s[j]==c3||s[j]==c4))flag=false;
				}
			}
			else {
				char s1=s[i],s2=s[j];
				c1=--s1;c2=++s[i];c3=--s2;c4=++s[j];
				if(!(c1==c4||c1==c3||c2==c3||c2==c4))flag=false;
			}
		}
		if(flag)puts("YES");else puts("NO");
	}
}


#include<bits/stdc++.h>
using namespace std;
int n,m;
string s;
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
	cin>>m;
	cin>>s;
	bool flag=true;
	for(int j=0;j<m;j++)
	{
	//cout<<j<<endl<<m-j-1<<endl;
	if(abs(s[j]-s[m-j-1])>1)
    {
    flag=false;
    break;
	}
	}
	if(flag)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
}
    return 0;
	}


#include<bits/stdc++.h>
using namespace std;
int n,m;
string s;
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
	cin>>m;
	cin>>s;
	bool flag=true;
	for(int j=0;j<m;i++)
	if(abs(s[j]-s[m-j-1])>1)
    flag=false;
	if(flag)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
}
    return 0;
	}


#include<bits/stdc++.h>
using namespace std;
int n,m;
string s;
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
	cin>>m;
	cin>>s;
	bool flag=true;
	for(int j=0;j<m;j++)
	{
	//cout<<j<<" "<<m-j-1<<endl;
	if(abs(s[j]-s[m-j-1])>2)
    {
    flag=false;
    break;
	}
	}
	if(flag)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
}
    return 0;
	}


#include<bits/stdc++.h>
using namespace std;
int n,m;
string s;
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
	cin>>m;
	cin>>s;
	bool flag=true;
	for(int j=0;j<m;j++)
	{
	int k=abs(s[j]-s[m-j-1]);
	if(k>2||k==1)
    {
    flag=false;
    break;
	}
	}
	if(flag)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
}
    return 0;
	}


#include<bits/stdc++.h>
using namespace std;
int a,b,c,l,r,y,z,man,mix,d[2000000],ans,ans1;
//vector<long long> v1,v;
//set<long long> st;
//map<long long,long long> mp,mp1;
string s,s1,s2;
//pair<int,int> p[100000];
//deque <long long> dq[200000];
bool o,b;
int main(){
    cin>>a;
    for(int i = 0; i < a; i++){
      cin>>b>>s;
      for(int j = 0; j < b/2; j++){
        if(s[j]!=s[b-j-1] && s[j]!=s[b-j-1]-1 && s[j]!=s[b-j-1]-2 s[j]!=s[b-j-1]+1 s[j]!=s[b-j-1]+2){
          cout<<"NO"<<endl;b=true;break;
        }
      }
      if(b==false)
        cout<<"YES"<<endl;
      b=false;
    }
}


#include<bits/stdc++.h>
using namespace std;
int a,b,c,l,r,y,z,man,mix,d[2000000],ans,ans1;
//vector<long long> v1,v;
//set<long long> st;
//map<long long,long long> mp,mp1;
string s,s1,s2;
//pair<int,int> p[100000];
//deque <long long> dq[200000];
bool o;
int main(){
    cin>>a;
    for(int i = 0; i < a; i++){
      cin>>b>>s;
      for(int j = 0; j < b/2; j++){
        if((s[j]==s[b-j-1]-1 || s[j]==s[b-j-1]+1) || (s[j]!=s[b-j-1]+2 && s[j]!=s[b-j-1]-2 && s[j]!=s[b-j-1])){
          cout<<"NO"<<endl;o=true;break;
        }
//        if(i==4)
//            cout<<(char)(s[b-j-1]+1);
      }
      if(o==false)
        cout<<"YES"<<endl;
      o=false;
    }
}


#include<bits/stdc++.h>
using namespace std;
int a,b,c,l,r,y,z,man,mix,d[2000000],ans,ans1;
//vector<long long> v1,v;
//set<long long> st;
//map<long long,long long> mp,mp1;
string s,s1,s2;
//pair<int,int> p[100000];
//deque <long long> dq[200000];
bool o;
int main(){
    cin>>a;
    for(int i = 0; i < a; i++){
      cin>>b>>s;
      for(int j = 0; j < b/2; j++){
        if((s[j]==s[b-j-1]-1 || s[j]==s[b-j-1]+1) || (s[j]!=s[b-j-1]+2 && s[j]!=s[b-j-1]-2 && s[j]!=s[b-j-1])){
          cout<<"NO"<<endl;o=true;break;
        }
        if(i==4)
            cout<<(char)(s[b-j-1]+1);
      }
      if(o==false)
        cout<<"YES"<<endl;
      o=false;
    }
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,e,tt;
    string s;
    char a[1000];
    cin>>n;
    while(n--)
    {
        cin>>e;
        cin>>s;
   // cout<<s[4]-s[1]<<endl;

             int p=e/2;
            // cout<<s[0]<<" "<<s[e-1]<<endl;
            tt=0;

            for(int i=0,j=e-1;i<p&&j>=p;i++,j--)
            {

                   if((s[j]-s[i])==2||((s[j]-s[i])==0))
                   {
                       tt++;
                      // cout<<s[j]<<" "<<s[i]<<endl;
                      // cout<<tt<<endl;
                   }
            else{
                cout<<"NO"<<endl;
                break;
            }

                }

            if((tt*2)==e)
            {
                cout<<"YES"<<endl;
            }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,e,tt;
    string s;
    char a[1000];
    cin>>n;
    while(n--)
    {
        cin>>e;
        cin>>s;
   // cout<<s[4]-s[1]<<endl;

             int p=e/2;
            // cout<<s[0]<<" "<<s[e-1]<<endl;
            tt=0;

            for(int i=0,j=e-1;i<p&&j>=p;i++,j--)
            {

                   if((s[j]-s[i])==2||((s[j]-s[i])==0))
                   {
                       tt++;
                      // cout<<s[j]<<" "<<s[i]<<endl;
                      // cout<<tt<<endl;
                   }

                }

            if((tt*2)==e)
            {
                cout<<"YES"<<endl;
            }
            else{
                cout<<"NO"<<endl;
            }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,e,tt;
    string s;
    char a[1000];
    cin>>n;
    while(n--)
    {
        cin>>e;
        cin>>s;
   // cout<<s[4]-s[1]<<endl;

             int p=e/2;
            // cout<<s[0]<<" "<<s[e-1]<<endl;
            tt=0;

            for(int i=0,j=e-1;i<p&&j>=p;i++,j--)
            {

                   if(abs((s[j]-s[i]))==2||((s[j]-s[i])==0))
                   {
                       tt++;
                      // cout<<s[j]<<" "<<s[i]<<endl;
                      // cout<<tt<<endl;
                   }

                }

            if((tt*2)==e)
            {
                cout<<"YES"<<endl;
            }
            else{
                cout<<"NO"<<endl;
            }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,e,tt;
    string s;
    char a[1000];
    cin>>n;
    while(n--)
    {
        cin>>e;
        cin>>s;
   // cout<<s[4]-s[1]<<endl;

             int p=e/2;
            // cout<<s[0]<<" "<<s[e-1]<<endl;
            tt=0;

            for(int i=0,j=e-1;i<p&&j>=p;i++,j--)
            {

                   if((s[j]-s[i])==2||((s[j]-s[i])==0))
                   {
                       tt++;
                      // cout<<s[j]<<" "<<s[i]<<endl;
                      // cout<<tt<<endl;
                   }

                }

            if((tt*2)==e)
            {
                cout<<"Yes"<<endl;
            }
            else{
                cout<<"No"<<endl;
            }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,e,tt;
    string s;
    char a[1000];
    cin>>n;
    while(n--)
    {
        cin>>e;
        cin>>s;
   // cout<<s[4]-s[1]<<endl;

             int p=e/2;
            // cout<<s[0]<<" "<<s[e-1]<<endl;
            tt=0;

            for(int i=0,j=e-1;i<p&&j>=p;i++,j--)
            {

                   if((s[j]-s[i])==2||((s[j]-s[i])==0))
                   {
                       tt++;
                      // cout<<s[j]<<" "<<s[i]<<endl;
                      // cout<<tt<<endl;
                   }
            else{
                cout<<"NO"<<endl;
                return 0;
            }

                }

            if((tt*2)==e)
            {
                cout<<"YES"<<endl;
            }
            else{
                cout<<"NO"<<endl;
            }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
//typedef   unordered_map<string,void *> mstop;

int main()
{
    //freopen("input", "r", stdin);
    //freopen("output", "w", stdout);
    // ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
      int t;
      cin>>t;
  	  while(t--!=0){
        int n;string s;
        cin>>n>>s;
        int f=0;
        for(int i=0;i<n-1;i++)
          {
            if(i==0){
              if(s[i]!=s[n-i-1])f=1;
            }
            else{
              if(s[i]-1==s[n-i-1]-1||s[i]-1==s[n-i-1]+1||s[i]+1==s[n-i-1]+1||s[i]+1==s[n-i-1]-1)
                ;
              else f=1;
            }
          }
        if(f==1)cout<<"NO"<<endl;
        else cout<<"YES"<<endl;

      }

}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
//typedef   unordered_map<string,void *> mstop;

int main()
{
    //freopen("input", "r", stdin);
    //freopen("output", "w", stdout);
    // ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
      int t;
      cin>>t;
  	  while(t--!=0){
        int n;string s;
        cin>>n>>s;
        int f=0;
        for(int i=0;i<n-1;i++)
          {
            if(s[i]=='a'||s[i]=='z'||s[n-i-1]=='a'||s[n-i-1]=='z'){
              if(s[i]!=s[n-i-1])f=1;
            }
            else{
              if(s[i]-1==s[n-i-1]-1||s[i]-1==s[n-i-1]+1||s[i]+1==s[n-i-1]+1||s[i]+1==s[n-i-1]-1)
                ;
              else f=1;
            }
          }
        if(f==1)cout<<"NO"<<endl;
        else cout<<"YES"<<endl;

      }

}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
//typedef   unordered_map<string,void *> mstop;

int main()
{
    //freopen("input", "r", stdin);
    //freopen("output", "w", stdout);
    // ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
      int t;
      cin>>t;
  	  while(t--!=0){
        int n;string s;
        cin>>n>>s;
        int f=0;
        for(int i=0;i<n/2;i++)
          {
            if(s[i]=='a'||s[i]=='z'||s[n-i-1]=='a'||s[n-i-1]=='z'){
              if(s[i]!=s[n-i-1])f=1;
            }
            else{
              if(s[i]-1==s[n-i-1]-1||s[i]-1==s[n-i-1]+1||s[i]+1==s[n-i-1]+1||s[i]+1==s[n-i-1]-1)
                ;
              else f=1;
            }
          }
        if(f==1)cout<<"NO"<<endl;
        else cout<<"YES"<<endl;

      }

}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
//typedef   unordered_map<string,void *> mstop;

int main()
{
    //freopen("input", "r", stdin);
    //freopen("output", "w", stdout);
    // ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
      int t;
      cin>>t;
  	  while(t--!=0){
        int n;string s;
        cin>>n>>s;
        int f=0;
        for(int i=0;i<n/2;i++)
          {
            if(s[i]=='a'||s[i]=='z'||s[n-i-1]=='a'||s[n-i-1]=='z'){
              int ff=0;
              for(int ii=0;ii<2;ii++)
                for(int jj=0;jj<2;jj++){
                  int t1=s[i],t2=s[n-i-1];

                  if(ii==0)t1+=1;
                  else t1-=1;
                  if(t1<'a')t1='b';
                  if(t1>'z')t1='y';
                  if(jj==0)t2+=1;
                  else t2-=1;
                  if(t2<'a')t2='b';
                  if(t2>'z')t2='y';
                  if(t1==t2)ff=1;
                }
                if(ff!=1)f=1;
            }
            else{
              if(s[i]-1==s[n-i-1]-1||s[i]-1==s[n-i-1]+1||s[i]+1==s[n-i-1]+1||s[i]+1==s[n-i-1]-1)
                continue;
              else f=1;
            }
          }
        if(f==1)cout<<"NO"<<endl;
        else cout<<"YES"<<endl;

      }

}


#include <bits/stdc++.h>

using namespace std;

short abs(short x)
{
	return x < 0 ? -x : x;
}

int main()
{
	short t;
	cin >> t;
	while(t--)
	{
		short n;
		string s;
		cin >> n >> s;
		string answer = "YES";
		for(short i = 0; i < n / 2; i++)
		{
			short dist = s[i] - s[n - 1 - i];
			if(dist > 0 && dist != 2)
			{
				answer = "NO";
				break;
			}
		}
		cout << answer << endl;
	}
}


import java.util.Scanner;
import  java.lang.Math;

public class ThreeLogos{

public static void main(String args[]){

Scanner input = new Scanner(System.in);
int x1 = input.nextInt();
int y1 = input.nextInt();
int x2 = input.nextInt();
int y2 = input.nextInt();
int x3 = input.nextInt();
int y3 = input.nextInt();
int temp;
int area = x1*y1 + x2*y2 + x3*y3;
int s = (int) Math.sqrt((double)area);
//int ans = check(area,s,x1,x2,x3,y1,y2,y3);
//System.out.println(ans);

int ans = 0;
char[][] m = new char[s][s];
//public static int check(int area,int s,int x1,int x2,int x3,int y1,int y2,int y3){
if(s*s != area)
ans = -1;
else
{
if(x1<=y1){
temp=x1;
x1=y1;
y1=temp;
}
if(x2<=y2)
{
temp=x2;
x2=y2;
y2=temp;
}
if(x3<=y3)
{
temp=x3;
x3=y3;
y3=temp;
}

/*System.out.println("side is "+s);
System.out.println("x1 is "+x1);
System.out.println("y1 is "+y1);
System.out.println("x2 is "+x2);
System.out.println("y2 is "+y2);
System.out.println("x3 is "+x3);
System.out.println("y3 is "+y3);
*/
int x_co = x1+x2+x3;
int y_co = y1+y2+y3;
/*
System.out.println("l is "+x_co);
System.out.println("b is "+y_co);
*/
if((y_co < s) || (x_co > (s*3)))
ans = -1;
else{
//System.out.println("Within range");
if(x3==s && y_co!=s){
//System.out.println("x3 is longest");
if(x1+y2!=s && y1+x2!=s && x1+x2!=s)
ans = -1;
else{

for(int i=0;i<s;i++){
for(int j=0;j<y3;j++){
m[i][j]='C';
}
}
for(int i=0;i<((x1<y1?x1:y1));i++){
for(int j=y3;j<s;j++){
m[i][j]='A';
}
}
for(int i=((x1<y1?x1:y1));i<s;i++){
for(int j=y3;j<s;j++){
m[i][j]='B';
}
}
}
}
if(x2==s && y_co!=s){
//System.out.println("x2 is longest");
if(x1+y3!=s && y1+x3!=s && x1+x3!=s)
ans = -1;
else{

for(int i=0;i<s;i++){
for(int j=0;j<y2;j++){
m[i][j]='B';
}
}
for(int i=0;i<((x1<y1?x1:y1));i++){
for(int j=y2;j<s;j++){
m[i][j]='A';
}
}
for(int i=((x1<y1?x1:y1));i<s;i++){
for(int j=y2;j<s;j++){
m[i][j]='C';
}
}
}
}

if(x1==s && y_co!=s){
//System.out.println("x1 is longest");
if(x2+y3!=s && y2+x3!=s && x2+x3!=s)
ans = -1;
else{

for(int i=0;i<s;i++){
for(int j=0;j<y1;j++){
m[i][j]='A';
}
}
for(int i=0;i<((x2<y2?x2:y2));i++){
for(int j=y1;j<s;j++){
m[i][j]='B';
}
}
for(int i=((x2<y2?x2:y2));i<s;i++){
for(int j=y1;j<s;j++){
m[i][j]='C';
}
}
}
}

if(y_co==s){
//System.out.println("Sum of Widths = "+s);
if(x_co!=(s*3))
ans = -1;
else{
for(int i=0;i<s;i++){
for(int j=0;j<y1;j++){
m[i][j]='A';
}
}
for(int i=0;i<s;i++){
for(int j=y1;j<y1+y2;j++){
m[i][j]='B';
}
}
for(int i=0;i<s;i++){
for(int j=y1+y2;j<s;j++){
m[i][j]='C';
}
}
}
}
}
}

if(ans==-1)
System.out.println(-1);
else{
System.out.println(s);
for(int i=0;i<s;i++){
for(int j=0;j<s;j++){
System.out.print(m[i][j]);
}
System.out.println();
}
}

}
}


import java.util.Scanner;
import  java.lang.Math;

public class ThreeLogos{

public static void main(String args[]){

Scanner input = new Scanner(System.in);
int x1 = input.nextInt();
int y1 = input.nextInt();
int x2 = input.nextInt();
int y2 = input.nextInt();
int x3 = input.nextInt();
int y3 = input.nextInt();
int temp;
int x,y;
int area = x1*y1 + x2*y2 + x3*y3;
int s = (int) Math.sqrt((double)area);
//int ans = check(area,s,x1,x2,x3,y1,y2,y3);
//System.out.println(ans);

int ans = 0;
char[][] m = new char[s][s];
//public static int check(int area,int s,int x1,int x2,int x3,int y1,int y2,int y3){
if(s*s != area)
ans = -1;
else
{
if(x1<=y1){
temp=x1;
x1=y1;
y1=temp;
}
if(x2<=y2)
{
temp=x2;
x2=y2;
y2=temp;
}
if(x3<=y3)
{
temp=x3;
x3=y3;
y3=temp;
}
/*
System.out.println("side is "+s);
System.out.println("x1 is "+x1);
System.out.println("y1 is "+y1);
System.out.println("x2 is "+x2);
System.out.println("y2 is "+y2);
System.out.println("x3 is "+x3);
System.out.println("y3 is "+y3);
*/
int x_co = x1+x2+x3;
int y_co = y1+y2+y3;
/*
System.out.println("l is "+x_co);
System.out.println("b is "+y_co);
*/
if((y_co < s) || (x_co > (s*3)))
ans = -1;
else{
//System.out.println("Within range");
if(x3==s && y_co!=s){
//System.out.println("x3 is longest");
if(x1+y2!=s && y1+x2!=s && x1+x2!=s && y1+y2!=0)
ans = -1;
else{

if(y1==s-y3)
x=x1;
else
x=y1;

for(int i=0;i<s;i++){
for(int j=0;j<y3;j++){
m[i][j]='C';
}
}
for(int i=0;i<x;i++){
for(int j=y3;j<s;j++){
m[i][j]='A';
}
}
for(int i=x;i<s;i++){
for(int j=y3;j<s;j++){
m[i][j]='B';
}
}
}
}

if(x2==s && y_co!=s){
//System.out.println("x2 is longest");
if(x1+y3!=s && y1+x3!=s && x1+x3!=s && y1+y3!=0)
ans = -1;
else{

if(y1==s-y2)
x=x1;
else
x=y1;

for(int i=0;i<s;i++){
for(int j=0;j<y2;j++){
m[i][j]='B';
}
}
for(int i=0;i<x;i++){
for(int j=y2;j<s;j++){
m[i][j]='A';
}
}
for(int i=x;i<s;i++){
for(int j=y2;j<s;j++){
m[i][j]='C';
}
}
}
}

if(x1==s && y_co!=s){
//System.out.println("x1 is longest");
if(x2+y3!=s && y2+x3!=s && x2+x3!=s && y2+y3!=s)
ans = -1;
else{

if(y2==s-y1)
x=x2;
else
x=y2;

for(int i=0;i<s;i++){
for(int j=0;j<y1;j++){
m[i][j]='A';
}
}
for(int i=0;i<x;i++){
for(int j=y1;j<s;j++){
m[i][j]='B';
}
}
for(int i=x;i<s;i++){
for(int j=y1;j<s;j++){
m[i][j]='C';
}
}
}
}

if(y_co==s){
//System.out.println("Sum of Widths = "+s);
if(x_co!=(s*3))
ans = -1;
else{
for(int i=0;i<s;i++){
for(int j=0;j<y1;j++){
m[i][j]='A';
}
}
for(int i=0;i<s;i++){
for(int j=y1;j<y1+y2;j++){
m[i][j]='B';
}
}
for(int i=0;i<s;i++){
for(int j=y1+y2;j<s;j++){
m[i][j]='C';
}
}
}
}
if(x1!=s && x2!=s && x3!=s && y_co!=s)
ans=-1;
}
}

if(ans==-1)
System.out.println(-1);
else{
System.out.println(s);
for(int i=0;i<s;i++){
for(int j=0;j<s;j++){
System.out.print(m[i][j]);
}
System.out.println();
}
}

}
}