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