#include <bits/stdc++.h>
bool isPalindrome(std::vector<int> v) {
  auto it = v.begin();
  auto it2 = v.end() - 1;
  while (it < it2) {
    if (!(*it == *it2 || *it - *it2 == 2 || *it - *it2 == -2)) return false;
    it++;
    it2--;
  }
  return true;
}
int main() {
  int n;
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    std::string s;
    std::cin >> s >> s;
    std::vector<int> v;
    for (char c : s) {
      v.push_back(((int)c));
    }
    std::cout << (isPalindrome(v) ? "YES" : "NO") << '\n';
  }
}
