#include <bits/stdc++.h>
using namespace std;
int d(char a, char b) {
  int dist = abs(a - b);
  return dist;
}
int main() {
  int n;
  cin >> n;
  while (n--) {
    int l;
    cin >> l;
    string s;
    cin >> s;
    bool possible = true;
    for (int i = 0; i < l / 2; i++) {
      if (d(s[i], s[l - 1 - i]) > 2 || d(s[i], s[l - 1 - i]) == 1)
        possible = false;
    }
    cout << (possible ? "YES" : "NO") << endl;
  }
  return 0;
}
