#include <iostream>
#include <bits/stdc++.h>
#include <cstring>
#include <cstdlib>
#include <utility>
#include <set>
#include <math.h>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
typedef long long ll;
int main()
{
  ll t;
  cin >> t;
  while (t--)
  {
    string s;
    cin >> s;
    char ch = (char)(s.size()+96);
    ll end=s.size()-1, start=0, flag=0;

    while(start<=end){
      if(s[start]==ch)
        start++;
      else if(s[end]==ch)
        end--;
      else {
        flag=1;
        break;
      }
      ch = (char)((int)ch-1);
    }
    if(flag)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
    }
  return 0;
}
