#include <bits/stdc++.h>
using namespace std;
struct re {
  int x, y;
};
const int maxC = 1e9 + 10;
const int maxN = 1e3 + 10;
const double pi = 3.14;
int t, n;
string s;
string solve() {
  cin >> n >> s;
  --n;
  for (int i = 0; i <= n / 2; ++i)
    if (abs(s[i] - s[n - i]) > 2 || abs(s[i] - s[n - i]) == 1) return "NO";
  return "YES";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    cout << solve() << endl;
  }
  return 0;
}
