#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <algorithm>
#include <deque>
#include <iostream>
#include <string>
#include <math.h>
using namespace std;
int n;
int main() {
scanf("%d", &n);
while (n--) {
string s;
int x;
cin >> x >> s;
bool flag = false;
for (int i = 0;i <= ((x-1) / 2);++i) {
int e = abs(s[i] - s[x - i - 1]);
if (e == 0 || e == 2) {
}
else {
flag = true;
}
}
if (flag) {
printf("NO\n");
}
else {
printf("YES\n");
}
}
//system("pause");
return 0;
}