#include <bits/stdc++.h>
using namespace std;
long t, n;
string s;
void jax() {
  cin >> n >> s;
  for (long i = 0; i <= n / 2 - 1; ++i) {
    if ((abs(s[i] - s[n - i - 1]) == 2) || (abs(s[i] - s[n - i - 1]) == 0))
      continue;
    cout << "NO"
         << "\n";
    return;
  }
  cout << "YES"
       << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) jax();
  return 0;
}
