#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
string tostring(int number) {
  stringstream ss;
  ss << number;
  return ss.str();
}
int toint(const string& s) {
  stringstream ss;
  ss << s;
  int x;
  ss >> x;
  return x;
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
template <typename T>
inline T rd(T& x);
void usaco(string name) {
  freopen((name + ".in").c_str(), "r", stdin);
  freopen((name + ".out").c_str(), "w", stdout);
}
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int ttt = 1;
  cin >> ttt;
  for (int zxc = 1; zxc < ttt + 1; zxc++) {
    int n;
    cin >> n;
    ;
    string s;
    cin >> s;
    string ans = "YES";
    for (int i = 0; i < (n / 2); ++i) {
      char first = s[i];
      char last = s[n - i - 1];
      int temp = abs(first - last);
      if (temp == 0 || temp == 2) continue;
      ans = "NO";
      break;
    }
    cout << ans << "\n";
  }
}
