#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    for (int i = 0; i < n / 2; ++i) {
      if (abs(s[i] - s[n - i - 1]) != 2 && abs(s[i] - s[n - i - 1]) != 0) {
        cout << "NO\n";
        break;
      }
      if (i == n / 2 - 1) cout << "YES\n";
    }
  }
  return 0;
}
