#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int j = 1; j <= n; ++j) {
    int k;
    cin >> k;
    string s;
    cin >> s;
    s = ' ' + s;
    bool ok = true;
    for (int i = 1; i <= k / 2; ++i) {
      if (abs(s[i] - s[k - i + 1]) == 2 or s[i] - s[k - i + 1] == 0) {
        continue;
      }
      ok = false;
      break;
    }
    if (ok) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
