#include <bits/stdc++.h>
using namespace std;
bool checkPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 1) return (power(a, b - 1) * a) % 1000000007;
  long long q = power(a, b / 2);
  return (q * q) % 1000000007;
}
bool CPT(long long n) { return !(n & (n - 1)); }
long long gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(int a, int b) { return (a / gcd(a, b)) * b; }
bool compare(string a, string b) {
  string ab = a + b;
  string ba = b + a;
  return ab > ba;
}
long long nC2(long long n) { return n * (n - 1) / 2; }
bool isPalindrome(string str) {
  int n = str.size();
  for (int i = 0; i < n / 2; i++)
    if (str.at(i) != str.at(n - i - 1)) return false;
  return true;
}
int countSquares(int a, int b) { return (floor(sqrt(b)) - ceil(sqrt(a)) + 1); }
void solve() {
  long long n;
  cin >> n;
  string str;
  cin >> str;
  int i = 0, j = str.size() - 1;
  while (i < j) {
    if (abs(str[i] - str[j]) != 2 && abs(str[i] - str[j]) != 0) {
      cout << "NO"
           << "\n";
      return;
    }
    i++, j--;
  }
  cout << "YES"
       << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt;
  cin >> tt;
  while (tt--) solve();
  return 0;
}
