#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n;
    string s;
    cin >> n >> s;
    bool succ = true;
    for (int i = 0, j = n - 1; i < n / 2; i++, j--) {
      if (s[i] != s[j] && max(s[i], s[j]) - min(s[i], s[j]) != 2) {
        succ = false;
        break;
      }
    }
    if (succ)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
