#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
string str;
int main() {
  std::ios::sync_with_stdio(false);
  int T, n;
  cin >> T;
  while (T--) {
    cin >> n >> str;
    bool fl = true;
    for (int l = 0, r = n - 1; l < r; ++l, --r) {
      if (abs(str[l] - str[r]) == 2 || str[l] == str[r]) continue;
      fl = false;
    }
    if (fl)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
