#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("omit-frame-pointer")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <class T>
void debug(vector<T> vec) {
  for (int i = 0; i < vec.size(); i++) cerr << vec[i] << " ";
  cerr << "\n";
}
template <class T>
void debug(vector<vector<T> > vec) {
  for (int i = 0; i < vec.size(); i++) {
    for (int ii = 0; ii < vec[i].size(); ii++) cerr << vec[i][ii] << " ";
    cerr << "\n";
  }
}
void solve() {
  int T;
  int i;
  cin >> T;
  for (int i = 0; i < T; i++) {
    int n;
    string s;
    cin >> n;
    cin >> s;
    if (s.size() == 1) {
      cout << "YES"
           << "\n";
      continue;
    } else if (s.size() == 2) {
      if (abs(s[0] - s[1]) > 2 || abs(s[0] - s[1]) == 1)
        cout << "NO"
             << "\n";
      else
        cout << "YES"
             << "\n";
      continue;
    }
    int x;
    bool possible = true;
    for (int x = 0; x < n / 2; x++) {
      if (abs(s[x] - s[n - x - 1]) > 2 || abs(s[x] - s[n - x - 1]) == 1) {
        possible = false;
        cout << "NO"
             << "\n";
        break;
      }
    }
    if (possible == true)
      cout << "YES"
           << "\n";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin.tie(NULL);
  int testcases = 1;
  while (testcases-- != 0) {
    solve();
  }
}
