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