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