#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int _;
  cin >> _;
  while (_--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    bool ok = 1;
    for (int i = 0; i < n; i++) {
      int dt = abs(s[i] - s[n - 1 - i]);
      if (dt != 0 && dt != 2) {
        ok = 0;
      }
    }
    if (ok)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
