#include <bits/stdc++.h>
using namespace std;
int t, i, l;
int c, d;
char a[200];
int main() {
  for (cin >> t, i = 1; i <= t; ++i) {
    cin >> l >> a;
    for (int j = 0, k = l - 1; j < k; ++j, --k) {
      c = (int)a[j];
      d = (int)a[k];
      if (abs(c - d) < 3 and abs(c - d) != 1)
        continue;
      else {
        c = 1;
        cout << "NO" << endl;
        break;
      }
    }
    if (c != 1) cout << "YES" << endl;
  }
}
