#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int t, n, i, dis;
  cin >> t;
  while (t--) {
    cin >> n >> s;
    string a, b;
    int flag = 0;
    for (i = 0; i < n / 2; i++) a += s[i];
    for (i = n / 2; i < n; i++) b += s[i];
    reverse(b.begin(), b.end());
    for (i = 0; i < n / 2; i++) {
      dis = abs(a[i] - b[i]);
      if (dis == 1 || dis > 2) {
        flag = 1;
        break;
      }
    }
    if (flag == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
