#include <bits/stdc++.h>
using namespace std;
bool can_be_palindrome(string s) {
  int n = s.length();
  int b;
  for (int i = 0; i < n / 2; i++) {
    b = (int)s.at(i) - (int)s.at(n - 1 - i);
    b = abs(b);
    if (b > 2) return false;
    if (b & 1) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    string s;
    cin >> s;
    if (can_be_palindrome(s))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
