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