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