#include <bits/stdc++.h>
using namespace std;
int main() {
  long long T;
  cin >> T;
  string s;
  for (long long k = 1; k <= T; k++) {
    long long n;
    bool ok = true;
    cin >> n >> s;
    long long i = 0, j = n - 1;
    while (j > i) {
      if (s[i] != s[j] and abs(s[i] - s[j]) != 2) ok = false;
      i++;
      j--;
    }
    if (ok)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
