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