#include "bits/stdc++.h"
using namespace std;
#define ll long long int
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll t, n;
  string s;
  cin >> t;
  while (t--) {
    cin >> s;
    vector<char> c = {'$'};
    for (char ch = 'a'; ch <= 'z'; ch++) c.push_back(ch);
    ll n = s.size();
    ll f = 1;
    while (s.size() != 0) {
      if (s[(ll) s.size() - 1] == c[n]) n--, s.pop_back();
      else if (s[0] == c[n]) s.erase(s.begin()), n--;
      else break;
    }
    if (s.size() == 0) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}
