#include <bits/stdc++.h>
using namespace std;
int i, j, n, m, aa, k;
string s;
int main() {
  std::cin.sync_with_stdio(false);
  std::cin.tie(0);
  cin >> m;
  i = 0;
  while (i < m) {
    cin >> n >> s;
    aa = 0;
    j = 0;
    while (j <= n / 2) {
      k = abs(s[j] - s[n - j - 1]);
      if (k == 0 || k == 2) {
      } else {
        aa = 1;
      }
      j++;
    }
    if (aa == 1) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
    }
    i++;
  }
  return 0;
}
