#include <bits/stdc++.h>
using namespace std;
char s[110];
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    cin >> s + 1;
    int flag = 0;
    for (int i = 1; i <= n / 2; ++i) {
      int num = abs(s[i] - s[n - i + 1]);
      if (num == 2 || num == 0)
        continue;
      else {
        flag = 1, cout << "NO" << endl;
        break;
      }
    }
    if (!flag) cout << "YES" << endl;
  }
  return 0;
}
