#include <bits/stdc++.h>
using namespace std;
char s[1010];
void solve() {
  int n;
  scanf("%d %s", &n, s + 1);
  for (int i = n >> 1; i >= 1; i--) {
    int a = i, b = n + 1 - i;
    int x = abs(s[a] - s[b]);
    if (x == 0 || x == 2) continue;
    puts("NO");
    return;
  }
  puts("YES");
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) solve();
}
