#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n >> s;
    bool ans = true;
    for (int i = 0; i < (n / 2) && ans; i++) {
      if (s[i] != s[n - 1 - i] && (abs((int)(s[i] - s[n - i - 1])) != 2)) {
        ans = false;
      }
    }
    if (ans)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
