#include<bits/stdc++.h>
using namespace std;

#define pb push_back 
#define vsort(v) sort(v.begin(),v.end())
#define ll long long
#define li long int
#define ld long double
#define mod 1000000007
#define SET set<int>
#define vec vector<int>
#define lvec vector<long>
#define f(i,a,n) for(ll i=a;i<n;i++)
#define vin(v,n) for(long int q=0; q<n; q++){long int x; cin>>x; v.push_back(x);}
#define ain(a,n) for(long int q=0; q<n; q++){cin>>a[q];}
#define aout(a,n) for(long int q=0; q<n; q++){cout<<a[q];}
#define out(v) for(long int q=0; q<v.size(); q++){cout<<v[q];}
#define YN if(p==1){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define Yn if(p==1){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define No cout<<"No"<<endl;
#define Yes cout<<"Yes"<<endl;
#define test ll qq;cin>>qq;while(qq--){solve();}
#define notest solve();
#define all(a) (a).begin(), (a).end()
#define bitcount  __builtin_popcountll
#define prec(val,n) cout<<fixed<<setprecision(n)<<val<<endl;

int fac(int n);
int nCr(int n, int r){return fac(n)/(fac(r)*fac(n-r));}
int fac(int n){int r=1; for(int i=2; i<=n; i++){r=r*i;}return r;}

int modexp(ll a,unsigned ll b,int m){     //to find (a^b)%m
    int r=1;a=a%m;if (a==0){return 0;}while (b>0)
    {if(b&1){r=(r*a)%m;}b=b>>1;a=(a*a)%m;}return r;
}
bool isprime(ll x) {if(x==1) return false;if(x==2 || x==3) return true;
    for(ll i=2;i*i<=x;i++){if(x%i==0) return false;}return true;
}
vector<long long> allprime(){  //prime - seive => all prime numbers upto 10^6
    vector<long long> primes;bool prime[1000001];memset(prime,true,sizeof(prime));
    for (int p=2;p*p<=1000000;p++)
        {if (prime[p]==true){for (int i=p*p;i<=1000000;i+=p){prime[i]=false;}}}
    for (int p=2;p<=1000000;p++){if (prime[p]){primes.pb(p);}}return primes;
}

void solve(){
    string s;
    cin>>s;
    int n=s.length();
    vec v(n,0);
    for(int i=0; i<s.length(); i++){
        if(s[i]-'a'>=n){
            cout<<"NO"<<endl;
            return;
        }
        v[s[i]-'a']=1;
    }
    for(int i=0; i<v.size(); i++){
        if(v[i]==0){
            cout<<"NO"<<endl;
            return;
        }
    }
    int x=0, y=n-1;
    while(n){
        n--;
        if((s[x]-'a')==n){
            x++;
        }
        else if((s[y]-'a')==n){
            y--;
        }
        else{
            cout<<"NO"<<endl;
            return;
        }
    }
    cout<<"YES"<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif

    test;
    // notest;
    return 0;
}