#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, i = 0, flag = 0;
    scanf("%d", &n);
    char a[n];
    scanf("%s", a);
    while (i < n / 2) {
      if (abs(a[i] - a[n - 1 - i]) == 2 || abs(a[i] - a[n - 1 - i] == 0)) {
        i++;
      } else {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      printf("YES");
      printf("\n");
    } else {
      printf("NO");
      printf("\n");
    }
  }
}
