#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    string s;
    cin >> n;
    cin >> s;
    int flag = 0;
    int p = n / 2;
    p = p - 1;
    for (int i = 0; i <= p; i++) {
      if ((abs(s[i] - s[n - 1 - i]) != 2) && (s[i] != s[n - 1 - i])) {
        cout << "NO" << endl;
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      continue;
    }
    cout << "YES" << endl;
  }
  return 0;
}
