#include<bits/stdc++.h>
using namespace std;
     
#define ll long long
#define loop(i,a,n) for(ll i=a;i<n;++i)
#define revloop(i,a,b) for(ll i=a;i>=b;--i)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define INF 9999999999999999
#define MOD 1000000007

ll power(ll a,ll b,ll mod)
{
    ll ans=1;
    while(b>0)
    {
        if (b%2==1)
            ans=((ans%mod)*(a%mod))%mod;;
        a=((a%mod)*(a%mod))%mod;
        b=b/2;
    }
    return ans;
}
 
void func()
{
    string s;
    cin>>s;
    ll n=s.length();
    ll index = -1;
    loop(i,0,n){
        if(s[i]=='a') {
            index=i;
            break;
        }
    }
    bool flag=true;
    for (int i = index+1; i < n; ++i)
    {
        if(s[i]<s[i-1]){
            flag=false;
            break;
        }
    }
    for (int i = index-1; i >= 0; --i)
    {
        if(s[i]<s[i+1]){
            flag=false;
            break;
        }
    }
    sort(s.begin(), s.end());
    string test="";
    char start='a';
    loop(i,0,n){
        test+=start;
        start++;
    }
    if(test!=s){
        flag=false;
    }
    if (flag)
    {
        cout<<"YES"<<"\n";
    }
    else{
        cout<<"NO"<<"\n";
    }
}
 
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
 
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r" , stdin);
    freopen("output.txt", "w" , stdout);
    #endif
 
    ll t=1;
    cin>>t;
    //solve();
    while(t--)
    {
        func();
    }
 
}