#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  int n;
  string second;
  for (int i = 0; i < T; i++) {
    cin >> n >> second;
    bool bo = true;
    for (int i = 0; i < n; i++)
      if (abs(second[i] - second[n - i - 1]) > 2 ||
          abs(second[i] - second[n - i - 1]) % 2 == 1) {
        bo = false;
        break;
      }
    cout << (bo ? "YES" : "NO") << endl;
  }
  return 0;
}
