#include <bits/stdc++.h>
int main() {
  int T;
  std::cin >> T;
  while (T--) {
    int n;
    std::cin >> n;
    std::string s;
    std::cin >> s;
    bool ok = true;
    for (int i = 0; i < n / 2; ++i) {
      const char c1 = s[i];
      const char c2 = s[n - i - 1];
      if (c1 == c2) continue;
      if (c1 - 1 == c2 + 1 || c1 + 1 == c2 - 1) continue;
      ok = false;
      break;
    }
    std::cout << (ok ? "YES\n" : "NO\n");
  }
  return 0;
}
