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