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


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

        }else{
            left=start-1,right=start+1,check=1;
            for(int i=1;i<n;i++){
                if(s[left]==97+i){
                    left--;
                }else if(s[right]==97+i){
                    right++;
                }else{
                    check=0;
                    break;
                }
            }
            if(check){
                cout<<"YES"<<endl;
            }else{
                cout<<"NO"<<endl;
            }

        }
    }
    return 0;
}










