#include<iostream>
#include<cstring>

using namespace std;

const int N=30;
int cnt[N];

int main()
{

    int n;
    cin>>n;
    
    while(n--)
    {
        string res;
        cin>>res;
        int k=res.size();
        int ddd=0,xxx=100;
        int wz;
        for(int i=0;i<k;i++)
        {
            ddd=max(ddd,res[i]-'a'+1);
            xxx=min(xxx,res[i]-'a'+1);
            int e=i;
            
            cnt[++e]=res[i]-'a'+1;
            
            if((res[i]-'a'+1)==1)
            wz=i+1;
            
        }
        
        if((ddd-xxx+1)!=k||xxx!=1||ddd!=k)
        cout<<"NO"<<endl;
        else
        {
            int l,r;
            l=wz-1; 
            r=wz+1; 
            int ans=2;
            int flag=0;
            if(k==1)
            cout<<"YES"<<endl;
            else
            {
                 for(int i=2;i<=k;i++)
            {
               
                if(cnt[l]==ans||cnt[r]==ans)
                {
                    
                    if(cnt[l]==ans)
                    l=l-1;
                    else if(cnt[r]==ans)
                    r=r+1;
                    
                    ans++;
                }
                else
                {
                    flag=1;
                    cout<<"NO"<<endl;
                    break;
                }
                
            }
            
            if(flag==0)
            cout<<"YES"<<endl;
            }
           
        }
       
        
        memset(cnt,0,sizeof cnt);
       
    }
	
	return 0;
} 
