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