#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, n, i, j, k;
  cin >> T;
  string str;
  for (i = 0; i < T; i++) {
    cin >> n;
    cin >> str;
    for (j = 0, k = n - 1; j < n / 2; j++, k--) {
      if (abs(str.at(j) - str.at(k)) != 2 && abs(str.at(j) - str.at(k)) != 0) {
        cout << "NO" << endl;
        goto abc;
      }
    }
    cout << "YES" << endl;
  abc:;
  }
  return 0;
}
