#include <bits/stdc++.h>

using namespace std;

bool isAlphabetical(string s) {
  if (s.length() == 0) {
    return true;
  }
  auto curChar = (char)(s.length() - 1 + 'a');
  if (s[0] == curChar) {
    return isAlphabetical(s.substr(1, s.length() - 1));
  }
  if (s[s.length() - 1] == curChar) {
    return isAlphabetical(s.substr(0, s.length() - 1));
  }
  return false;
}

int main() {
  int testcases;
  cin >> testcases;
  while (testcases--) {
    string s;
    cin >> s;
    cout << (isAlphabetical(s) ? "YES" : "NO") << endl;
  }
}