#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s, r;
    cin >> s;
    r = s;
    bool ab = true;
    for (int i = 0; i < n; i++) {
      int k = abs(s[i] - s[n - i - 1]);
      if (k > 2 || k % 2 == 1) {
        ab = false;
        break;
      }
    }
    cout << (ab ? "YES" : "NO") << endl;
  }
  return 0;
}
