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

void print(vector<int> &A, int n){
    for(int i=0; i<n; i++){
        cout<<A[i]<<" ";
    }
    cout<<endl;
}

int32_t main(){
    int t;
    cin>>t;
    while(t--){
        string s;
        cin>>s;
        int right=30, left=30;
        int n = s.size();
        int flag=1;
        for(int i=0; i<n; i++){
            if(s[i]=='a'){
                right=i;
                left=i;
            }
        }
        for(int i=1; i<n; i++){
            if(left>0 and s[left-1]=='a'+i){
                left=left-1;
            }else if(right<n-1 and s[right+1]=='a'+i){
                right=right+1;
            }else{
                flag=0;
                break;
            }
        }
        if(flag==0){
            cout<<"NO"<<endl;
            continue;
        }
        if(left==0 and right==n-1){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
}