#include <bits/stdc++.h>
using namespace std;
int t;
int n;
char s[1234];
int main() {
  scanf("%d\n", &t);
  for (int x = 0; x < t; x++) {
    scanf("%d\n", &n);
    scanf("%s\n", s);
    int ok = 1;
    for (int i = 0; ok && i < n / 2; i++) {
      if (abs(s[i] - s[n - 1 - i]) != 0 && abs(s[i] - s[n - 1 - i]) != 2)
        ok = 0;
    }
    if (ok)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
