#include <bits/stdc++.h>
using namespace std;
const int maxn = 10e5;
int main() {
  int t;
  scanf("%d", &t);
  int ti;
  int x, y;
  string a;
  int cont = 0;
  for (int i = 0; i < t; i++) {
    scanf("%d", &ti);
    cin >> a;
    x = ti - 1;
    y = 0;
    for (int j = 0; j < ti; j++) {
      if (int(a[x]) + 1 == int(a[y]) + 1)
        cont++;
      else if (int(a[x]) + 1 == int(a[y]) - 1)
        cont++;
      else if (int(a[x]) - 1 == int(a[y]) + 1)
        cont++;
      else if (int(a[x]) - 1 == int(a[y]) - 1)
        cont++;
      x--;
      y++;
    }
    if (cont == a.length())
      printf("YES\n");
    else
      printf("NO\n");
    cont = 0;
  }
  return 0;
}
