#include <bits/stdc++.h>
using namespace std;
char buf[1000];
int main() {
  ios::sync_with_stdio(false);
  cout.setf(ios::fixed);
  cout.precision(20);
  int T;
  scanf("%d", &T);
  while (T--) {
    int n;
    scanf("%d", &n);
    scanf("%s", buf);
    int l = 0, r = n - 1;
    int ans = 1;
    while (l < r) {
      int tmp = abs(buf[l] - buf[r]);
      l++, r--;
      if (!(tmp == 0 || tmp == 2)) ans = 0;
    }
    printf("%s\n", ans ? "YES" : "NO");
  }
  return 0;
}
