#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    int n, kol = 0;
    string s;
    cin >> n >> s;
    for (int j = 0; j < n / 2; j++)
      if (abs(s[j] - s[n - j - 1]) > 2 || abs(s[j] - s[n - j - 1]) == 1) kol++;
    if (kol > 0)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}
