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