#include <bits/stdc++.h>
using namespace std;
bool isPalin(string s) {
  for (int i = 0; i < s.length() / 2; i++) {
    if (s[i] != s[s.length() - i - 1]) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int tests = 1;
  cin >> tests;
  while (tests--) {
    int n, i;
    cin >> n;
    string s;
    cin >> s;
    bool possible = true;
    for (i = 0; i < s.length() / 2; i++) {
      if (abs(s[n - i - 1] - s[i]) == 0 || abs(s[n - i - 1] - s[i]) == 2)
        continue;
      possible = false;
      break;
    }
    cout << (possible ? "YES\n" : "NO\n");
  }
  return 0;
}
