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