#include <bits/stdc++.h>
using namespace std;
int main() {
  int a_i, b_i, testCase, n, s;
  cin >> testCase;
  string st;
  bool is;
  while (testCase--) {
    is = true;
    cin >> n;
    cin >> st;
    for (a_i = 0, b_i = n - 1; a_i <= b_i; a_i++, b_i--) {
      s = abs(st[a_i] - st[b_i]);
      if (s == 1 || s > 2) is = false;
    }
    if (is)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
