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