#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, a, temp;
  string s;
  cin >> t;
  for (int i = 0; i < t; i++) {
    temp = 0;
    cin >> n;
    cin >> s;
    for (int j = 0; j < n / 2; j++) {
      a = s[j] - s[n - 1 - j];
      if (a != 0 && a != 2 && a != -2) {
        temp = 1;
        break;
      }
    }
    temp == 1 ? cout << "NO" << endl : cout << "YES" << endl;
  }
}
