#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b, c, t, f;
  string s;
  cin >> t;
  while (t--) {
    cin >> n;
    cin >> s;
    a = 0;
    b = n - 1;
    f = 0;
    for (; a < n / 2; a++, b--) {
      if (s[a] == s[b] || (s[a] - 1 == s[b] + 1) || (s[a] + 1 == s[b] - 1))
        continue;
      else {
        f = 1;
        break;
      }
    }
    if (f == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
