#include <bits/stdc++.h>
using namespace std;
const int nmax = 110;
char s[nmax];
bool pal(int n) {
  int i;
  for (i = 0; i <= (n - 1) / 2; i++)
    if (abs(s[i] - s[n - i - 1]) > 2 || abs(s[i] - s[n - i - 1]) == 1) return 0;
  return 1;
}
int main() {
  int t, n, i;
  cin >> t;
  for (i = 1; i <= t; i++) {
    cin >> n >> s;
    if (pal(n) == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
