#include <bits/stdc++.h>
const int maxn = 1e4 + 5;
using namespace std;
char str[105];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d%s", &n, str);
    int len = strlen(str);
    bool flag = 1;
    for (int i = 0; i < len / 2; i++) {
      int temp = abs(str[i] - str[len - i - 1]);
      if (temp == 2 || temp == 0)
        continue;
      else {
        flag = 0;
        break;
      }
    }
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
