#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, t, n, br;
  scanf("%d", &t);
  while (t) {
    t--;
    br = 0;
    scanf("%d", &n);
    char str[200];
    scanf("%s", &str);
    for (i = 0; i < n / 2; i++) {
      char a = str[i];
      char b = str[n - i - 1];
      if (abs(a - b) != 2 && a != b) {
        br = 1;
        break;
      }
    }
    if (br == 1)
      printf("NO\n");
    else
      printf("YES\n");
  }
  return 0;
}
