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