#include <bits/stdc++.h>
using namespace std;
bool solve(string s) {
  int n = static_cast<int>((s).size());
  for (int(i) = 0; (i) < (n / 2); ++(i)) {
    int d = abs(s[i] - s[n - 1 - i]);
    if (d != 0 && d != 2) return false;
  }
  return true;
}
int main() {
  int nn;
  scanf("%d", &(nn));
  for (int(i) = 0; (i) < (nn); ++(i)) {
    int n;
    scanf("%d", &(n));
    string s;
    ({
      char _c[(n) + 1];
      scanf((std::string("%") + std::to_string(n) + "s").c_str(), _c);
      (s) = _c;
    });
    printf("%s\n", solve(s) ? "YES" : "NO");
  }
}
