#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &f) {
  f = 0;
  T x = 1;
  char ch = getchar();
  while (ch < 48 || ch > 57) {
    if (ch == '-') {
      x = -1;
    }
    ch = getchar();
  }
  while (ch <= 57 && ch >= 48) {
    f = f * 10 + ch - '0';
    ch = getchar();
  }
  f *= x;
}
long long T;
long long n;
char c[100005];
char ch;
int main() {
  read(T);
  while (T--) {
    read(n);
    scanf("%s", c + 1);
    bool flag = 1;
    for (long long i = 1; n - i + 1 > i; i++) {
      if (abs(c[i] - c[n - i + 1]) > 2 || abs(c[i] - c[n - i + 1]) == 1) {
        flag = 0;
        break;
      }
    }
    if (flag == 1) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
