#include <bits/stdc++.h>
using namespace std;
long long n, q;
string s;
int main() {
  cin >> q;
  while (q--) {
    cin >> n >> s;
    bool p = 0;
    long long mid = n / 2;
    for (long long i = 0; i < mid; i++) {
      if (fabs(s[i] - s[s.size() - 1 - i]) != 0 and
          fabs(s[i] - s[s.size() - 1 - i]) != 2) {
        cout << "NO" << endl;
        p = 1;
        break;
      }
    }
    if (!p) cout << "YES" << endl;
  }
}
