#include <bits/stdc++.h>
typedef long long ll;
#define f(i,a,b) for(ll i=a;i<b;i++)
#define pb push_back
#define p push

using namespace std;

int main()
{
    ll t;
    cin>>t;
    while(t--){
        string a;
        char ch='a';
        cin>>a;
        int i;
        map<char, int> s;
        
        int n=a.length();
        for(i=0;i<n;i++){
            s[ch]=0;
            ch++;
        }
        int no=0;
        f(i, 0, n){
            if(s.find(a[i])==s.end()) no++;
            else if(i!=0&&i!=n-1&&a[i]>a[i-1]&&a[i]>a[i+1]) no++;
            else if(s[a[i]]>0) no++;
            s[a[i]]++;
            if(no>0) break;
        }
        if(no>0) cout<<"NO"<<endl;
        else cout<<"YES"<<endl;
        
    }

    return 0;
}
