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