#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  bool valid = true;
  for (int i = 0; i <= n / 2 && valid; i++)
    valid &= abs(s[i] - s[n - i - 1]) == 0 || abs(s[i] - s[n - i - 1]) == 2;
  cout << (valid ? "YES\n" : "NO\n");
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) solve();
  return 0;
}
