#include <bits/stdc++.h>
using namespace std;
bool func(char a, char b) {
  if (a + 1 == b - 1) return true;
  if (a + 1 == b + 1) return true;
  if (a - 1 == b - 1) return true;
  if (a - 1 == b + 1) return true;
  return false;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    for (int i = 0, j = s.size() - 1; i < j; i++, j--) {
      if (!func(s[i], s[j])) goto label;
    }
    cout << "YES" << endl;
    continue;
  label:
    cout << "NO" << endl;
  }
}
