#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, i, j, k, cnt = 0;
  string str;
  cin >> t;
  for (i = 0; i < t; i++) {
    cin >> n;
    cin >> str;
    for (j = 0, k = n - 1; j < n / 2, k >= n / 2; j++, k--) {
      if (str[j] == str[k]) {
        cnt++;
      } else if (str[j] - str[k] == 2 || str[j] - str[k] == -2) {
        cnt++;
      }
    }
    if (cnt == n / 2) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
    cnt = 0;
  }
}
