#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, n;
  string str;
  cin >> q;
  while (q--) {
    cin >> n >> str;
    int i = 0, j = n - 1, sign = 1;
    while (i < j) {
      if (abs(str[i] - str[j]) != 0 && abs(str[i] - str[j]) != 2) {
        sign = 0;
      }
      i++;
      j--;
    }
    if (sign == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
