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