#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, n, i;
  string s;
  string::iterator it;
  string::reverse_iterator ti;
  bool can_be;
  cin >> T;
  for (i = 0; i < T; ++i) {
    cin >> n >> s;
    it = s.begin();
    ti = s.rbegin();
    can_be = true;
    for (int i = 0; i <= n / 2; ++i) {
      if (abs(*it - *ti) != 0 && abs(*ti - *it) != 2) {
        can_be = false;
        break;
      }
      it++;
      ti++;
    }
    if (can_be) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
