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